Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 16 made on Friday May 28, 2010 at 06:40
mikasound
Long Time Member
Joined:
Posts:
March 2010
15
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?
milan


Hosting Services by ipHouse