Peace, Mike
Yep. And the subtext to my style of response is "If you are not using 2.0 yet, here is one very good reason to make the move."
Tracy
From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schmalle
Sent: Tuesday, June 06, 2006 6:23 PM
To: [email protected]
Subject: Re: [flexcoders] Alternative to firstChild, lastChild and nextSibling
Tracy....
:-( That is what I was getting to :) I guess being direct works ... HA
Peace, MikeOn 6/6/06, Tracy Spratt < [EMAIL PROTECTED]> wrote:
E4x:
xml_object.PaymentMethods; //PayPal
xml_object.SiteHostedPicture.GalleryType; //http://…..
Tracy
From: [email protected] [mailto:[email protected]] On Behalf Of Charles
Sent: Tuesday, June 06, 2006 5:52 PM
To: [email protected]
Subject: [flexcoders] Alternative to firstChild, lastChild and nextSibling
Hi everyone,
I am trying to parse some XML for relevant info using firstChild, lastChild, and nextSibling. For instance, given an XML file like...
<Item>
<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>
...when I try to get the ItemID, I just go xml_object.firstChild.firstChild. But, when I try and get things from the bottom, I would have to go something like xml_object.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild (which would give me PaymentMethods...I think). I could use xml_object.lastChild.firstChild, but that's not the point. I would just like to know if there is an alternative to this sort of accessing of the XML fields?
My main concern is that for some XML files, the structure is slightly different (i.e. the <Site></Site> tags are not there). So, the long call to access PaymentMethods for one XML file would not work on another. Rather, it would return SiteHostedPicture for those. Any help would be great.
Thanks
Charles
--
What goes up, does come down.
--
What goes up, does come down. __._,_.___
--
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] Alternative to firstChild, lastChild and... Tracy Spratt
- Re: [flexcoders] Alternative to firstChild, lastChil... Michael Schmalle
- RE: [flexcoders] Alternative to firstChild, lastChil... Tracy Spratt
- Re: [flexcoders] Alternative to firstChild, last... Michael Schmalle
- RE: [flexcoders] Alternative to firstChild, lastChil... Tracy Spratt
Reply via email to

