You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Ron Rothblum <RO...@il.ibm.com> on 2003/02/04 14:00:58 UTC
getChildNodes
Can I always be sure that the method 'getChildNodes()' will return the same
NodeList or can the order of the nodes be different from call to call?
Thanks,
Ron Rothblum.
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
RE: getChildNodes
Posted by Arnaud Le Hors <le...@us.ibm.com>.
Let me clarify what I meant, when I said "no". I meant that the NodeList
object is not necessarily always the same object. Such as one you could test
for identity with == in java. The implementation is free to allocate a new
object every time you call getChildNodes. This said, it is however the same
logical object. Which is why the order of the nodes it contains doesn't
change.
--
Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
-----Original Message-----
From: Arnaud Le Hors [mailto:lehors@us.ibm.com]
Sent: Wednesday, February 05, 2003 1:08 PM
To: general@xml.apache.org
Subject: RE: getChildNodes
These are two different questions. The answer to the first one is no. The
DOM spec doesn't impose this behavior to implementations.
On the other hand, to answer your second question, assuming the document
doesn't get modified between the calls the order of the nodes it contains
will be the same.
--
Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
-----Original Message-----
From: Ron Rothblum [mailto:RONR@il.ibm.com]
Sent: Tuesday, February 04, 2003 5:01 AM
To: general@xml.apache.org
Subject: getChildNodes
Can I always be sure that the method 'getChildNodes()' will return the same
NodeList or can the order of the nodes be different from call to call?
Thanks,
Ron Rothblum.
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
RE: getChildNodes
Posted by Arnaud Le Hors <le...@us.ibm.com>.
These are two different questions. The answer to the first one is no. The
DOM spec doesn't impose this behavior to implementations.
On the other hand, to answer your second question, assuming the document
doesn't get modified between the calls the order of the nodes it contains
will be the same.
--
Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
-----Original Message-----
From: Ron Rothblum [mailto:RONR@il.ibm.com]
Sent: Tuesday, February 04, 2003 5:01 AM
To: general@xml.apache.org
Subject: getChildNodes
Can I always be sure that the method 'getChildNodes()' will return the same
NodeList or can the order of the nodes be different from call to call?
Thanks,
Ron Rothblum.
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
---------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org