Invalid escaping of XML

Artem Portnoy <[email protected]>
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
Hello,



We have an XmlBean that takes in a String. The problem is that if we pass in
an XML String, the XML characters are not properly escaped.



Here’s a simple program I use to test…



  *public* *static* *void* main(String[] args) {

    Trace trace = TestProcessFlowV2Res.Traces.Trace.Factory.*newInstance*();

    trace.setStringValue("<test>");

    System.*out*.println(trace);

  }



The output produced looks as follows…



<xml-fragment>&lt;test></xml-fragment>



For some reason the ‘>’ character is not getting escaped. We are currently
using XmlBeans 2.1.0. I’ve tried searching for similar bug reports on the
mailing list archive and couldn’t find anything. If anybody could shed some
light on this issue it would be greatly appreciated.


Thanks,


Artem Portnoy

Information Builders, Inc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.