some_label.text=xml_object.ItemID.Title.toString();
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


2006/6/7, Charles < [EMAIL PROTECTED]>:

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




__,_._,___

Reply via email to