Mihai Matei wrote:
Hi,We are using Xerces-C 2.7 to generate various xml files, but some parsers that consume our files cannot consume them. In order to modify our files (they are XML compliant, but the other parsers are not), do you know if:
The first thing to do is to fix or replace your non-compliant tools. XML has been around long enough that you shouldn't tolerate something like that.
1. - can we left-justify the ouput? I looked at the options of the DOMWriter and there isn't any about it. Essentially we'd like a 'pretty print' output but with no whitespace at the beginning of the line.
There is no notion of "left-justify" in XML, so I'm not sure what that means. Arbitrarily stripping whitespace from a document can change its content, so you should be careful about doing that.
and, if 1. cannot be achieved: 2. - can we save the xml stream to a string, so we can update it before saving to a file?
MemBufFormatTarget is your friend... Dave
