Hello,

I can't get the XMLSerializer to perform proper indentation. Several people
on this list and elsewhere on the net have been asking this question again
and again but I didn't find an answer to it anywhere. If the answer exists
somewhere please point me to it.

The problem is that, as it seems, the Serializer does not insert
newline-characters properly (or I don't understand how to use it ;-).

If you build an XMLSerializer with an output-format with indentation set to
true and give it

<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>
  <p>Hello World</p>
</doc>

it nonetheless yields

<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>   <p>Hello World</p> </doc>

that is with the newline characters converted to spaces and no indentation.

If you give it

<?xml version="1.0" encoding="ISO-8859-1"?>
<doc><p>Hello World</p></doc>

it yields

<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>
  <p>Hello World</p>
</doc>

that is it properly indents respecting the indent-value.

Somewhat strange, isn't it? Thanks for your help!

Regards,

  Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to