Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to read \r\n in MSXML?

From: "Anthony Jones" <Ant@------------.--->
To: NULL
Date: 3/10/2008 9:03:00 AM

"Adam Badura" <adam@h...> wrote in message
news:E6D1E2C8-16B0-4637-90AC-C9C18979EA85@m......
>     I have pretty formatted XML file like for example
>
> <root>
>     <element></element>
>     <element>spaces         end spaces</element>
>     <element>new line
> end new line</element>
> </root>
>
>     The new lines are written (by MSXML) as \r\n. But after reading them
> (again with MSXML, preserveWhiteSpaces is set to true) the new lines are
> changed to \n (all other white spaces are alright, even the number of new
> lines is correct, only the are marked with \n instead of \r\n).
>     Is there a possibility to have the \r\n preserved? (I cannot just
change
> all \n to \r\n since this would change those \n which where lone \n in the
> XML file as well.)
>

Its a little strange to have an XML file where some text nodes would contain
\n and others might contain \r\n.    However if changing all \n to \r\n
would break things then you'll need to replace them in after retrieving text
that should have \r\n instead of \n.

-- 
Anthony Jones - MVP ASP/ASP.NET




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent