Altova Mailing List Archives

Re: [xsl] Q: Using, how to convert ASCII text into XML acceptable text?

From: Jirka Kosek <jirka@-------->
Date: 5/6/2004 1:34:00 AM
Shenan Hawkins wrote:

> Hopefully I can get some help with this - sorry if it's not the correct

You were right, this is not correct mailing list :-)

> Let's assume I have one C# statement:
> string myString = "This & That";
> Is there a built in method/function that I can call that will turn the
string contents into something that will work in an XML file? (for instance,
convert "&" to "&amp;"... I know I could do a manual .replace method call, but
I want something intrinsic/better)

Use XmlWriter class. It can do a lot of character escaping and namespace
declaration work for you.


   Jirka Kosek     e-mail: jirka@xxxxxxxx
   ProfesionC!lnC- E!kolenC- a poradenstvC- v oblasti technologiC- XML.
         Cvod do XML 3.5.            DocBook 18.-19.5.
         XSLT 24.-26.5.              XML pro vC=vojC!Ee 7.-8.6.

[****** removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]


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 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.