You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Ole Matzura <Ol...@mogul.com> on 2005/08/04 10:44:01 UTC

getDomNode and namespaces

Hi all!
 
I'm trying to take advantage of the new getDomNode method in xmlbeans 2 but am having namespace-related problems; the "old" newDomNode returned a node that had the relevant namespace declarations, the node returned by getDomNode does not contain these and I cant find any way of getting them from the xmlobject without resorting to newDomNode..
 
any help is greatly appreciated!
 
regards,
 
Ole

Re: getDomNode and namespaces

Posted by Eric Vasilik <er...@gmail.com>.
The difference between getDomNode and newDomNode is that newDomNode
creates a copy of the XML tree via the save process which synthesizes
namespace declarations relevant to the needs of textually saving a
document.  The method getDomNode, on the other hand, does not make a
copy of the XML tree.  It returns a node which represents the live
tree and does not synthesize the namespace attributes.  So, other than
namespace declarations, the trees described by getDomNode and
newDomNode should be similar.  They are not meant to produce identical
trees.

- Eric

On 8/4/05, Ole Matzura <Ol...@mogul.com> wrote:
> Hi all!
>  
> I'm trying to take advantage of the new getDomNode method in xmlbeans 2 but
> am having namespace-related problems; the "old" newDomNode returned a node
> that had the relevant namespace declarations, the node returned by
> getDomNode does not contain these and I cant find any way of getting them
> from the xmlobject without resorting to newDomNode..
>  
> any help is greatly appreciated!
>  
> regards,
>  
> Ole

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org