Re: XmlTextWriter.WriteString and quoted chars

Chris Anderson <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <316FA43F497FD411AD4000A0CC53D812350491@NOVASVR1>
Why not write "&", and let the parser do it's job and convert it to "&amp;"
?

:-)
Merak

> -----Original Message-----
> From: Sam Gentile [mailto:[email protected]]
>
> This is a pretty simple question but I want to be able to
> write out "&amp;" as part of an Xml string. The doc says:
> WriteString does the following
>
> The characters &, <, and > are replaced with &amp;, &lt;, and
> &gt;, respectively. So I get &amp;amp.
>
> How can I escape the characters?

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.