You want the Title from the ItemID not from the xml object.
some_label.text=xml_object.(@xmlns=="...").ItemID;
I'm not sure why it thinks that @xmlns doesn't exists but it should be == as it's not an assignment.
Kind regards,
Sonja Duijvesteijn
Hi everyone,
This is a follow-up question from my last post < http://groups.yahoo.com/group/flexcoders/message/38691?threaded=1&var=1 >. I've managed to use an XML object instead of an XMLDocument object, so that I can utilize E4X to parse the XML. BUT, my new problem is that for some xml results that are returned, the tags have attributes, and now the calls to access the child nodes don't work anymore. For instance...
var xml_object = <Item xmlns="some.namespace.com"> // Item tag now has attribute xmlns="..."
<ItemID>110000579339</ItemID>
<Site>US</Site>
<Title>Halo 2 (Xbox)</Title>
<Currency>USD</Currency>
<SiteHostedPicture>
<GalleryType>http://somesite.com/somepicture.jpg </GalleryType>
</SiteHostedPicture>
<PaymentMethods>PayPal</PaymentMethods>
</Item>
So, calls that used to work to access child nodes, such as some_label.text=xml_object.Title, which would return the items title, used to work but now they just display nothing...? I've tried using the @ attribute operator in calls such as some_label.text=xml_object.(@xmlns="...").ItemID, but still nothing (I actually get an error for that last call - undefined property 'xmlns'). So now I'm stuck until I can figure out how to access those child nodes with the attribute on there, or to somehow parse the XMl and remove the attribute before I try to access the child nodes.
Thanks in advance
Charles
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] Using E4X with attributes in XML tags Sonja Duijvesteijn
- [flexcoders] Re: Using E4X with attributes in XML ... Geoffrey Williams
Reply via email to