ourXML is already at the <one> node. Try: var name:String = ourXML.two.name.text(); //the text() is not always necessary
When in doubt view the xml by doing: trace(ourXML.toXMLString()); Tracy Spratt, Lariat Services, development services available _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Raymond Brown Sent: Thursday, April 22, 2010 8:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ResultEvent from HttpService not parsing xml I have an xml doc: <one> <two> <name>Bob</name> </two> </one> I have a Httpservice tage with url, resulthandler, faulthandler and resultformat="e4x". In my resulthandler, I have this: var ourXML:XML = event.result as XML; var name:String = ourXML.one.two.name; var x:int = 0; Here is the problem, I put a break point on the int assignment and look at the variables. I see that event.result AND ourXML both have the xml document in them but my name variable is empty. I even tried something like this - if (event.result.one.two.name =="Bob) and it fails. What are we missing? The debugger clearly shows the data is there but I can never seem to get it out.