cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

whether the thingworx support ActiveXObject?

向郭
1-Newbie

whether the thingworx support ActiveXObject?

In the program, the  getxml()  can't get an invaild xml,so i get the text with gettext(),then I want to change the text and convert to xml,this process will use ActiveXObject.

when execute the js code , thingworx prompt error.

anyone would help me ?

3 REPLIES 3

Hi Xiang,

There's no ActiveXObject as this is a Browser object and you are at server side Javascript.

But you are lucky as TW Server Side Javascript supports E4X and you can natively work with XML objects, if you want to instantiate a new Xml, just var a = new XML(youXMLstring);

向郭
1-Newbie
(To:向郭)

thank you coll,

I also want to know how to convert the text into xml ?or how to get rid of the hated " <?xml version="1.0" standalone="yes"?>" in the xml perface?

Text to XML --> just as said on my previous post:

var aXMLobject = new Object(aXMLstring);

Top Tags