I am a new user of XMLBeans, previously having used XMLSpy to build Java to XML helper classes. I am having trouble passing XML strings to XMLBeans. When I try to set a string field (statusMessage) to:
                docAckHdr.addStatusMessage("<error><type>BadSku</type></error>");
 
the output is:
<statusMessage>&lt;error>&lt;type>BadSku&lt;/type>&lt;/error></statusMessage>
 
the first weird thing is that the > is not converted to &gt; , but it gets weirder. When I try to add a third xml element:
                docAckHdr.addStatusMessage("<error><type>BadSku</type><mess>Abadskunumber</mess></error>");
the output is:
<statusMessage><![CDATA[<error><type>BadSku</type><mess>Abadskunumber</mess></error>]]></statusMessage>
 
I don't want the CDATA tag. Is there a way to turn it off? And how do I get the greater than symbol to convert? This same statement worked well in XMLSpy.
 
 
Thanks,
Ross
 

Reply via email to