View Single Post
  #1 (permalink)  
Old Oct 12th, 2006, 14:54
DocBoy52 DocBoy52 is offline
Junior Member
Join Date: Jun 2004
Location: USA
Age: 25
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Extracting Text out of XML Nodes

I have a very simple XML file:

<?xml version="1.0" encoding="UTF-8">
<phoneBook>
<contact id="1">
<name>John Smith</name>
</contact>
</phoneBook>


My objective is to get Flash to trace the name "John Smith". I have the XML document imported in fine with no errors. If I do a trace on "myXML.firstChild.firstChild.firstChild" it will print out "<name>John Smith</name>" ... but if I trace "myXML.firstChild.firstChild.firstChild.nodeValue" , it comes out null. Does anybody know how I can get Flash to extract the text from a node, when the node / document tree isn't created in Flash?

Thanks
Reply With Quote