Lists Home |
Date Index |
I'll interpret your question as: since an XML element can be accessed by
its position in an XML document tree, isn't the element name
inconsequential? The answer is no.
Your example is similar to DOM processing (use of "ChildNode"), which is
only one of multiple methods of processing an XML document - so the
notion of one accessing/not accessing contents in one single way would
not be correct. And even if this were the only way to process an XML
document, can one access a given element by assuming that its position
in the XML document tree will always be the same in every scenario?
Booz | Allen | Hamilton
Jeffrey Fitzgerald wrote:
> Obviously a question from an XML newbie...
> But what is the point of custom naming xml elements when they are not
> accessed in an OOP manner?
> Here is what I mean:
> <whatsUp>Whats the point</whatsUp>
> My understanding is that you don't access the contents using syntax like:
> newbie.question.whatsUp.value, but rather an obscure
> childNodes.childNodes.childNodes.nodeValue (not even sure if that
> is right). But in any case, if you don't use the custom names
> then why not do:
> Thanks for enlightening me :-)...
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
fn:Joseph M. Chiusano