This is just a guess, because a key portion of the code is missing (in the
do xpath query stuff .......)

My guess is that when you clone the node, it is still owned by the original
document.  When that document goes out of scope, the clone goes out of
scope.  So what you probably want to do is import the nodes into another
document that stays alive a little longer.  I can't provide a snippet for
you because I don't use XalanNodes, but rather use Xerces because I need a
mutable DOM.

Using the deprecated Xerces API, the code looks something like this:

    DOM_Document theCopy = DOM_Document::createDocument();
    DOM_Element root = c.theMessage.getDocumentElement();
    theCopy.appendChild(theCopy.importNode(root.cloneNode(), true));

Is there something equivalent using the Xalan APIs directly (rather than
going through the DOM?)

Thanks,
Anthony Zawacki

410-571-7161
[EMAIL PROTECTED]

Reply via email to