I am calling a script on a server and it is returning the following:
<response stat="success">
<session id="84cbd48179efb3a49a99bf8066ac3746" last_login="2007-07-17
06:32:58"
key="99e5092715ddc304e08cc3392deee652b79442ce0d88fba606f97d46f857aa8f8a3801a
4799"/>
</response>
I am using AS3 and want to get the values of
session id
last_login
key
This is the code I am using but I cannot retrieve the value of "session id".
var loader:URLLoader=URLLoader(event.target);
var result:XML=new XML(loader.data);
var myXML:XMLDocument=new XMLDocument();
myXML.ignoreWhite=true;
myXML.parseXML(result.toXMLString());
var node:XMLNode=myXML.firstChild;
trace('Key= '+node.firstChild.attributes['key']);
trace('session id= '+node.firstChild.attributes['session id']);
trace('last_login= '+node.firstChild.attributes['last_login']);
I am thinking this is due to the space between "session" and "id" but I am
not sure how to get this value. I do not have access to the server side to
change "session id" to "session_id" which I imagine would fix it.
Possibly there is an easy fix to my parsing code?
Thanks in advance
Paul
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com