Hi, Thanks for helping guys it is very much appreciated. My problem is I have this xml file below:
<shops>
<shop name="Amazon1">
<category>Books</category>
<url>http://www.amazon.co.uk</url>
</shop>
</shops>
When Im in flash mx 2004, I have used the following code:
select = myshop.childNodes[0].childNodes[0].firstChild;
It retures <category>Books</category>, where I just want the value "Books"....
Anyone could help me, Its strange.
thanks
Flash with XML, Nodes problem
Started by simonk, Dec 30 2005 03:43 PM
4 replies to this topic
#1
Posted 30 December 2005 - 03:43 PM
#2
Posted 30 December 2005 - 05:07 PM
select = myshop.childNodes[0].childNodes[0].firstChild.attributes.category;
this should work just fine
this should work just fine
#4
Posted 31 December 2005 - 11:03 AM
what about instead of attributes using nodeValue?
#5
Posted 31 December 2005 - 05:15 PM
Im defeated
I have to use attributes for all my nodes, and it works alright now. Thanks anyway 
Its so strange that all the tutorials were using the firstChild / childNodes[0] method to select the nodes but I just can't.
Its so strange that all the tutorials were using the firstChild / childNodes[0] method to select the nodes but I just can't.
funkysoul, on Dec 31 2005, 04:03 PM, said:
what about instead of attributes using nodeValue?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
