permaculture playing cards*
The moose likes XML and Related Technologies and the fly likes XMLBeans is returning null on complex elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XMLBeans is returning null on complex elements" Watch "XMLBeans is returning null on complex elements" New topic
Author

XMLBeans is returning null on complex elements

Nathan England
Greenhorn

Joined: Jul 13, 2009
Posts: 20
I'm trying to use XMLBeans to parse an xml document. I have everything working up to a certain point.


The above code works fine, it parses with no errors, and prints the XML contents in its entirety. My problem, is that when I try to access the complex objects underneath the root element, the xmlbeans code is returning null. I have no error, or indication of any problem that could be occurring.

<root>
<ComplexType>
<simpleElement1>someText1</simpleElement1>
<ComplexType2>
<simpleElement2><someText2</simpleElement2>
...and so on

Why would I be able to do a requestObj.getComplexType().getSimpleElement1()
but
the ..getComplexType2() returns a null object?

Any ideas?

 
wood burning stoves
 
subject: XMLBeans is returning null on complex elements
 
Similar Threads
Issue in Parsing the xml file using xmlBeans
XMLBeans to Manage Multi-version XML
UTF8 Encoding While Writing in File - Out Of MemoryError
Compariosn between different Java Object XML Binding Framework
making changes to an xml document...help needed!