I am performing a query as exemplified in the
ApplyXPathDOM.java sample. I tried sticking the Node variable “n”
in the second (value) column of a hashmap and retrieving later to use in an
AppendChild call. This did not work! Variable “n” lost its
children. Here is the “n” I’m talking about from the
sample source code: XPathResult result =
(XPathResult)evaluator.evaluate(xpath, doc, resolver,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null); // Serialize the found nodes
to System.out.
System.out.println("<output>");
Node n; while ((n =
result.iterateNext())!= null){ What do I need to do to keep variable “n”
connected to the DOM? Maybe my problem is that I’m letting variable “result”
go out of scope? Siegfried |
- How to insert a fragment of one DOM into another? siegfried