I think you've hit the nail right on the head. Right now I want to convert my
code that calls the deprecated XMLSerializer to use LSSerializer and I can't
because the pretty-printing is so bad - it's not all that pretty. When using
the pretty-printing option the emphasis should be on maximizing readability.

We use pretty-printing for two main purposes: (1) we log our XML network
traffic and we have to be able to quickly and easily understand what is
going on, and (2) we store some basic data structures in files and during
trouble shooting we need to be able to quickly and easily understand what is
going on.

If XMLSerializer can do a good job why can't LSSerializer?

- Eric


keshlam wrote:
> 
> 
>> The DOM spec doesn't specify what pretty printing does. I believe what
>> Xerces is doing is fine.
> 
> By definition, pretty-printing changes whitespace and should not be used
> in
> situations where the whitespace is significant. If you want to be sure
> you're preserving document semantics, use basic DOM serialization
> instead... or set up a much more detailed prettyprint which understands
> exactly where whitespace is and isn't significant in this kind of
> document.
> 

-- 
View this message in context: 
http://www.nabble.com/Fomatting-question-serializing-DOM-with-pretty-print-tf3252607.html#a11351554
Sent from the Xalan - J - Users mailing list archive at Nabble.com.

Reply via email to