I've just started using XMLBeans (read newbie) and I've run into a problem. I
have a simple element and I am trying to get the value of it. Instead of
getting the value I keep getting an XML fragment.
An example should make this clearer:
XML snippet:
...
<RES SN="1" EN="10">
<M>1410</M>
...
XSD snippet:
...
<xs:element name="RES">
<xs:complexType>
<xs:sequence>
<xs:element ref="M"/>
...
Java Code snippet:
System.out.println(res.getM();
System.out.println(res.getM().xmlText());
System.out.println(res.getM().toString());
All 3 println() statements produce the following output:
<xml-fragment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1410</xml-fragment>
Why is it printing <xml-fragment ...>? What should I do just to get the
value (i.e. 1410)?
Thanks in advance,
MattC
--
View this message in context:
http://www.nabble.com/XMLBeans-%3A-How-can-I-get-a-value-and-not-an-xml-fragment--tp20521127p20521127.html
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]