|
Compare it to the Microsoft XML DOM, which
has dozens of classes. “XML”, huh, one class? How can that be? Tracy From: You got that right! E4x can do some crazy things.
Sometimes I wonder if I am kidding myself at how easy it is to use :) On 6/6/06, 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." From: [email protected]
[mailto:[email protected]]
On Behalf Of Michael Schmalle
On 6/6/06, E4x: xml_object.PaymentMethods;
//PayPal xml_object.SiteHostedPicture.GalleryType;
//http://….. From: [email protected]
[mailto:[email protected]]
On Behalf Of Charles 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> ...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
-- 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
YAHOO! GROUPS LINKS
|
- 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

