Re: Dropping carriage return characters from web service
- From: "MasterGaurav \(www.edujini-labs.com\)" <gaurav.vaish.nospam@xxxxxxxxxxxxxxxx>
- Date: Fri, 9 Feb 2007 13:44:36 +0530
The data passed by Web service will be serialized into XML format. In
XML,
both CR and LF are treated as a white space and therefore get normalized
in
the process. You can read more about it in the W3C Recommendation:
http://www.w3.org/TR/2004/REC-xml-20040204/#sec-common-syn.
I think replacing LF with CR+LF is a simple way to get around this.
Ah! Great thanks for the pointer.
I had always been under the impression that only insignificant white-spaces
(sequence of only-and-only whitespaces in a text-node) should be, if at all,
modified by any engine. The other piecees of content should be left
untouched.
Which means that if I have a content:
<description>This
is
a good description</description>
Any whitespaces should not be touched (read: deleted or transformed to
another)
<employee>
<description>... ... ...</description>
</employee>
In the case above, it may be transformed to
<employee>
<description>... ... ...</description>
</employee>
Correct me if I am wrong...
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
.
- References:
- RE: Dropping carriage return characters from web service
- From: Luke Zhang [MSFT]
- RE: Dropping carriage return characters from web service
- Prev by Date: Re: Calling a web service that's https
- Next by Date: handling exceptions thrown by web service methods ON THE SERVER
- Previous by thread: RE: Dropping carriage return characters from web service
- Next by thread: RE: Dropping carriage return characters from web service
- Index(es):
Relevant Pages
|