You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by si...@free.fr on 2007/10/25 17:23:10 UTC
How to access a DOMDocument node after calling selectSingleNode function
Hi,
I use the following tools to handle XML documents:
Xerces 2.7
Xalan 1.10
I want to manipulate a DOMDocument (add/remove/replace nodes) and to look for
nodes using XPath. The function selectSingleNode is called with a
XercesDOMWrapperParsedSource and returns a XalanNode.
The problem is that the XalanNode cannot be cloned or even imported (the program
cores).
My question is: how can the program get access to the DOMNode in the DOMDocument
through the XalanNode ?
Thanks for you help
Simon
Re: How to access a DOMDocument node after calling selectSingleNode
function
Posted by David Bertoni <db...@apache.org>.
simon.elbaz@free.fr wrote:
> Hi,
> I use the following tools to handle XML documents:
> Xerces 2.7
> Xalan 1.10
>
> I want to manipulate a DOMDocument (add/remove/replace nodes) and to look for
> nodes using XPath. The function selectSingleNode is called with a
> XercesDOMWrapperParsedSource and returns a XalanNode.
>
> The problem is that the XalanNode cannot be cloned or even imported (the program
> cores).
This shouldn't core, unless you're not catching exceptions.
> My question is: how can the program get access to the DOMNode in the DOMDocument
> through the XalanNode ?
This question has been asked many, many times in the past. Please search
the archives of the user and developer lists for more information. Also,
please look carefully at the header file for the wrapper classes and the
XalanSourceTreeParserLiaison and XercesDOMWrapperParsedSource classes, as
there is documentation that can help you.
Dave