Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
kuronen Super Contributor.
Super Contributor.
701 views

No DOMParser

Doing ecmascripting with Desiger and my road suddenly stopped at this


parser = new DOMParser();


Because I got this


Error Evaluating Script com.novell.soa.script.mozilla.javascript.EcmaError: ReferenceError: "DOMParser" is not defined. (unnamed script#50)


Should DOMParser be included in IDM? If not is there any other way to parse my XML than to add children one by one? Hate to invent wheel again.. or was is rectangle?
Labels (1)
0 Likes
3 Replies
kuronen Super Contributor.
Super Contributor.

Re: No DOMParser

DOMParser seems to be web browser only. Strangely it was in some NetIQ Cool solutions.

Managed to create a good parser with the help of earlier example in this forum so all good here.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: No DOMParser

On 1/18/2019 1:24 AM, kuronen wrote:
>
> Doing ecmascripting with Desiger and my road suddenly stopped at this
>
>
> Code:
> --------------------
>
> parser = new DOMParser();
>
> --------------------
>
>
> Because I got this
>
>
> Code:
> --------------------
>
> Error Evaluating Script com.novell.soa.script.mozilla.javascript.EcmaError: ReferenceError: "DOMParser" is not defined. (unnamed script#50)
>
> --------------------
>
>
> Should DOMParser be included in IDM? If not is there any other way to
> parse my XML than to add children one by one? Hate to invent wheel
> again.. or was is rectangle?
>
>


https://github.com/fchierad/PRD/tree/master/other

file: dom-xml.js

xml2dom(): Reads a well formed XML string and returns a DOM object built from it.
dom2xml(): onverts a DOM object to serialized XML.

and I just noticed the typo after pasting here 🙂 those are for User App back-end engine,
for the IDM driver there is a different approach to use.
0 Likes
Highlighted
kuronen Super Contributor.
Super Contributor.

Re: No DOMParser

Did the same but yours is more streamlined. Thanks for sharing!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.