ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wilson <>
Subject Re: Treatment of CR in XmlWriter
Date Sat, 31 Dec 2005 11:14:51 GMT

On 30 Dec 2005, at 23:39, Goh Tor Meng wrote:

> Hi,
> Thanks for the reply. As the receiving end is an external party  
> I'll have to check with
> them. What I know for now is that they are coding in Delphi.
> May I know what is meant by "Avoid normalization of CR to LF"?

The XML spec (section 2.111 - End of Line Handling) requires the all  
end of line sequences (CR, LF or CRLF) to replaced by a single LF  
character. So the XML parser will make that substitution before  
passing the text to the application. When we pass String data as a  
parameter to an XML-RPC call we want to preserve the CR characters so  
we replace them with a character reference. The XML parser will not  
"normalise" a character reference but will replace the reference with  
the actual CR character.

So, in summary, we are doing this to ensure that all the characters  
in the String are delivered unchanged to the recipient.

An excellent resource on the XML spec is Tim Bray's Annotated version It's not the very latest  
version of the spec but I find it very useful.

I hope this helps.

John Wilson
The Wilson Partnership

View raw message