> Rather than using a text node won't a <![CDATA[...]]> section protect
> the \r?

Nope. Line-break processing does occur in CDATA sections.

>Also adding a xml:space="preserve" attribute should work, too,
>shouldn't it?

Nope. Line-break processing occurs before space preservation, though
setting preserve will help keep the newline which that processing produces
from being thrown away.


XML's parsed representation of line-break is the Newline character. Inside
the program, unless you do some rather obscene things with entity
references, you will see only that character. If you want to express line
break as CRLF, or CR, it's your responsibility (or the serializer's
responsibility) to translate newline back into those platform-specific
forms, just as it's your responsibility or the serializer's responsibility
to translate characters into the proper encoding if that's necessary.


This is basic XML behavior, not Xerces behavior.


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

Reply via email to