> I knew that it was well-formed, thanks, but I was not able to imagine why
> the XML was generated in this unusually formatted way.

For unknown DTD or XML Schema, whitespace between </ends> and <begins> may be 
significant (e.g. inside a DocBook <programlisting>).  Putting the line breaks 
*inside* the elements, which is what is being done here:

>     <article
>     ><title
>     ></title
>     ><section
>     ><title
>     ></title
>     ><para
>     ></para
>     ></section
>     ></article
>     >

is always safe, and although it may look odd to humans, it will never confuse a 
machine.  When XXE generates "indented" mode, it will avoid putting whitespace 
in elements with format="preserve", but if the DTD or XML Schema cannot be 
found, the "indented" mode might generate a different document (perhaps it 
warns or refuses to generate indented output in this case, I'm not sure).

@alex

Reply via email to