Getting namespace info from a parsed XML file

2014-05-01 Thread jgagnon
I'm trying to figure out how to get the namespace information (the namespace(s) itself and the namespace prefix(es) that are applied to elements within the document) contained within an XML file after I have parsed it in XMLBeans. For example, consider the following XML snippet: ?xml version=1.0

Difficulties with using XPath to find an element

2014-05-11 Thread jgagnon
I am programmatically generating an XML object hierarchy and then using what I produced as a template for other work. I make a copy of the template structure (using XmlObject.copy() at the root node) and then attempt to locate a specific node within the structure so that I can then edit the

How to get an XmlObject parent

2014-05-16 Thread jgagnon
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,

XmlCursor tutorial

2014-06-24 Thread jgagnon
Does anyone know of any tutorials about using the XMLBeans XmlCursor? I've looked at the little bit on the XMLBeans site, but that really doesn't cover much. I'm trying to figure out how to use it to construct a document (actually many documents - test cases) and it is anything but intuitive.