----- Original Message -----
> void myclass::testAndAdd(DOM_TreeWalker &dtw)
>...............
> {
> // first i get back the DOM_Element lying behind the
> // DOM_TreeWalker.
> DOM_Element elem = (DOM_Element &) dtw.getCurrentNode();
>
> // then i performe a few test on it
> if( elem.getAttribute ...... )
> .....
>
> // finally if this element node have no parents, i append
> // it to another DOM_Element.
> bool orphan = (elem.getParentNode() == NULL);
> if( orphan )
> {
> // before performing the "appendChild", i test
> // the compatibility.
> if( elem.getOwnerDocument() == futurFather.getOwnerDocument() )
------------------------------------
Maybe you have to "create place" for a new element in the document before
you append it,
something like:
DOM_Element newelem =
futurFather.getOwnerDocument().createElement(elem.getNodeName());
newelem = elem.clone(true);
futurFather.appendChild(newelem); (instead of next line)
???
------------------------------------
> futurFather.appendChild(elem); /* THE EXCPETION IS THROWN
HERE */
> else
> {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]