We are trying to force Xerces to serialize out XML with PC-style linebreaks
(0x0D0A) and having no luck. Whatever we do UNIX-style ones are written out
(0x0A).

This is what we are doing:

{
      XercesDOMParser parser;

     // the file we are parsing has been created by an XML-editing tool.
That
     // tool has added some PC-style linebreaks at various spots
     parser.parse(path.c_str());

     // append some new nodes, change some existing ones

     DOMImplementation* pImpl =
DOMImplementationRegistry::getDOMImplementation(L"LS");
     DOMWriter* pSerializer = ((DOMImplementationLS*)pImpl)
->createDOMWriter();

     // *** what's wrong with this??? ***
     XMLCh crlf[3] = { 0x0D, 0x0A, 0x00 };
     pSerializer->setNewLine(crlf);
     ///////////////////////////////////////////////////

     LocalFileFormatTarget out(path.c_str())
     pSerializer->writeNode(&out, *parser.getDocument());

     // cleanup
}

What comes out is a file with each existing 0x0D0A converted into an 0x0A!
How can we stop this happening?

==============================
Oliver White
Software Engineer
Product Development
Westinghouse Signals Australia
==============================


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

Reply via email to