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