Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
None
-
None
-
None
-
Solaris 11 sparc,
Xerser version 2.11
Description
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<testxml>
<IDList>
<ID dentifier="demo1" Name="demo1"> </ID>
<ID dentifier="demo2" Name="好的我"> </ID>
</IDList>
</testxml>
Sample code used to Write this sample xml,
impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
theSerializer = ((DOMImplementationLS *)impl)->createLSSerializer();
theSerializer->setNewLine(xercesc::XMLString::transcode("\n"));
bufferTarget = new MemBufFormatTarget();
theOutput = ((DOMImplementationLS*)impl)->createLSOutput();
theOutput->setByteStream(bufferTarget);
theOutput->setEncoding(XMLString::transcode("UTF-8"));
theOutput->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true);
theOutput->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, true);
theSerializer->write(m_doc, theOutput);
std::string dump_xmlstring = std::string (xercesc::XMLString::transcode(bufferTarget->getRawBuffer()));
std::cout << dump_xmlstring <<std::endl;
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<testxml>
<IDList>
<ID dentifier="demo1" Name="demo1"> </ID>
<ID dentifier="demo2" Name="^Z^Z^Z"> </ID>
</IDList>
</testxml>