Hi. I have a problem parsing a xml.
Why xmlbeans replace root document element adding <xml-fragment>.

XML to parse:
---------------------------------
<person>
 <name>A name</name>
 <surname>A surname</surname>
</person>
---------------------------------


I parse the document:

XmlOptions options = new XmlOptions();
options.setLoadReplaceDocumentElement(null);
xobj = Person.Factory.parse(xml, options);

And when print the result :

xobj.xmlText(options); 

---------------------------------
<xml-fragment>
 <name>A name</name>
 <surname>A surname</surname>
</xml-fragment>
---------------------------------

I think the parse don“'t know what its the root of the document and ignores
the root of the xml in and changes it by <xml-fragment>. How can I do to set
the root element ?

So many thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/%3Cxml-fragment%3E-tf4776678.html#a13663978
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to