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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

whether the thingworx support ActiveXObject?

向郭
7-Bedrock

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);

向郭
7-Bedrock
(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);

Announcements


Top Tags