M
Marvin_123456
Hello,
I execute an XPath expression (with the javax.xml.xpath package) on a
DOM tree and get the result in a NodeList.
NodeList nodeList = (NodeList)xpath.evaluate("/a/b", document,
XPathConstants.NODESET);
The Node objects in the nodeList result are references to the nodes in
the DOM tree (document). So, when I change a value in a tree node, it
is also changed in the result and vice versa.
Is this behaviour consistent and one can rely on it that the result
consists always only of references to the source document DOM tree?
Thank you very much!
Regards,
Marvin
I execute an XPath expression (with the javax.xml.xpath package) on a
DOM tree and get the result in a NodeList.
NodeList nodeList = (NodeList)xpath.evaluate("/a/b", document,
XPathConstants.NODESET);
The Node objects in the nodeList result are references to the nodes in
the DOM tree (document). So, when I change a value in a tree node, it
is also changed in the result and vice versa.
Is this behaviour consistent and one can rely on it that the result
consists always only of references to the source document DOM tree?
Thank you very much!
Regards,
Marvin