Roger Wilco
Usenet Archive
- Joined
- Jun 22, 2004
- Messages
- 11
- Reaction score
- 0
I have a C++ application that uses an XML config file. It periodically needs to move a line (XML element) to the end of the file. I've written this using the C++ Xerces libraries (v2.5). The problem is that whitespacing gets REALLY screwed up. I'm not too concerned with looks, but this will start to get really ugly after running several hundred times.
FYI, I'm using fgDOMWRTFormatPrettyPrint and have tried disabling that.
The original looks something like:
<?xml version="1.0" encoding="ascii" standalone="no" ?>
<file>
<entry>item 1</entry>
<entry>item 2</entry>
<entry>item 3</entry>
<entry>item 4</entry>
</file>
After moving the first entry to the bottom, I get something like this:
<?xml version="1.0" encoding="ascii" standalone="no" ?> <recipientLists defaultSchemaPath="..\AddressLists\schema.txt">
<entry>item 2</entry>
<entry>item 3</entry>
<entry>item 4</entry>
<entry>item 1</entry>
</recipientLists>
FYI, I'm using fgDOMWRTFormatPrettyPrint and have tried disabling that.
The original looks something like:
<?xml version="1.0" encoding="ascii" standalone="no" ?>
<file>
<entry>item 1</entry>
<entry>item 2</entry>
<entry>item 3</entry>
<entry>item 4</entry>
</file>
After moving the first entry to the bottom, I get something like this:
<?xml version="1.0" encoding="ascii" standalone="no" ?> <recipientLists defaultSchemaPath="..\AddressLists\schema.txt">
<entry>item 2</entry>
<entry>item 3</entry>
<entry>item 4</entry>
<entry>item 1</entry>
</recipientLists>