I have some dificulities with E4X XML data standard. The code is:
----ProntoScript----
var httpLib = com.philips.HttpLibrary,url;
var url = "
http://api....xml"
function ParseXML(xmldata)
{
var xmldata = xmldata.replace(/^<\?xml\s+version\s*=\s*(['"])[^\1]+\1[^?]*\?>/, "")
var xmlObject = new XML(xmldata);
System.print(xmlObject.disp.@stat);//nothing
System.print(xmlObject.disp.what.photo[0].description);//nothing
System.print(xmlObject);//all XML displays on _PS_DEBUG_ widget
}
httpLib.getHTTP(url, ParseXML);
----/ProntoScript----
the xml data is
--- XML ---- # == <
#?xml version="1.0" encoding="utf-8" ?>
#disp stat="ok">
#what>
#photo>
#description>Desc 1#/description>
#/photo>
#photo>
#description>Desc 2#/description>
#/photo>
#/what>
#/disp>
--- /XML ----
And nothing happens. What am I doing wrong?