I am writing an application that uses the XMLBeans API to generate XML
instance documents.  In a nutshell I am doing this by creating XmlObject
instances and XmlCursors to make edits to the structure and content.  Once
the cursor has been placed properly, I insert/remove whatever I need
(comments, elements, text).

One problem I'm having, though, is generating a correct XPath format path to
be able to locate elements within the object hierarchy for editing.  I have
a mechanism in place now that uses something I came up with, and although it
works OK, it has some shortcomings.  I've had to come up with some kludgy
workarounds for some situations, for example abstract types.

I figured that it would make sense that the XmlObject family (including
XmlObject itself) would have the necessary attributes to allow for the path
to an element to be obtained simply by recursively checking for a "parent". 
However, there does not seem to be a provision for that capability, which I
find odd.

Does anyone have suggestions on how a given object in an XmlObject hierarchy
might be able to identify its path within the structure?



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/How-to-get-an-XmlObject-parent-tp7506.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

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

Reply via email to