Aleksander Slominski wrote: > i think i could do it i.e. to change xerces to do full round tripping as > new feature for Xerces2 (i have already experimented with something > similar moths ago by patching support for precise event location) > however as not many people seems to be interested in it ...
Only a small minority of the XML application developers really need round-tripping. Most of them are in the XML editor camp and want the file to stay *exactly* the same way it was when it was read in. >>It won't come out exactly as it went in but it's >>"pretty" enough for most people to read. > > so i guess you mean 'pretty printing; i.e. during serialization to call: > System.out.println() Yep, I was referring to pretty-printing of the XML to a stream. > still what do you mean exactly "line" in "print '\n' + line"? For example, if you have a comment *before* the root element, then you serialize the comment and follow it with a newline. That way you get something like this: <!-- comment --> <root/> instead of this: <!-- comment --><root/> And the same is true for comments and processing instructions appearing after the close of the root element -- but you would print the newline before serializing the XML. For example: <root/> <?target data?> <!-- comment --> instead of: <root/><?target data?><!-- comment --> For most people, that's "pretty" enough, I think. :) -- Andy Clark * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
