You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by argyn <ar...@cox.net> on 2005/10/12 16:31:31 UTC

does XmlObject have a reference to its root schema element?

suppose I have a reference to XmlObject. I want to find out what is the 
root element in the document, which contains this object. how can i do this?

thanks
argyn


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


Re: does XmlObject have a reference to its root schema element?

Posted by Eric Vasilik <er...@vasilik.com>.
Create an XmlCursor from the XmlObject and walk the cursor up the
parent chain, stopping just before the document container.  Under
well-formed circumstances, the cursor will be at the document element.
 Note that non well-formed documents do not always have a document
element, and that your original XmlObject may correspond to the
document itself, which has no parent.

- Eric

On 10/12/05, argyn <ar...@cox.net> wrote:
> suppose I have a reference to XmlObject. I want to find out what is the
> root element in the document, which contains this object. how can i do this?
>
> thanks
> argyn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

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