Mike Schilling schrieb:
> > Hello,
> >
[quoted text clipped - 17 lines]
> implementation that copies the entire DOM and returns nodes from that copy
> would be, as far as I know, conformant.
Hi Mike,
thank you very much for your answer. What I am doing right now is to
query for a set of nodes with an XPath expression, modify the data in
the result nodes and then reuse the original DOM on that the query was
evaluated. This would not work, if only copies of the nodes would be
returned as query result, since the data modification on the result
would be lost in the original DOM. At the moment it seems that this
always works, so the original DOM nodes and no copies are returned. My
question was, whether this behaviour is specified (for the used
java-package) or just "by chance" and there may be exceptions of it.
Regards,
Marvin_123456
Steve W. Jackson - 28 Jul 2005 18:29 GMT
> Mike Schilling schrieb:
> > > Hello,
[quoted text clipped - 33 lines]
> Regards,
> Marvin_123456
If you're using NodeList as provided by Sun's Java, you should read the
API JavaDocs on the NodeList interface. There, it specifically states
"NodeList objects in the DOM are live." So I personally would shy from
any implementation that violates that by implementing NodeList with
copies of the nodes in question.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
Mike Schilling - 28 Jul 2005 19:04 GMT
> Mike Schilling schrieb:
>> > Hello,
[quoted text clipped - 34 lines]
> question was, whether this behaviour is specified (for the used
> java-package) or just "by chance" and there may be exceptions of it.
Yes, and my answer is "It'll work in the XPath implementation you're using,
but there's AFAIK no guarantee it will work with other ones."