xsl-list
[Top] [All Lists]

Re: Q: Using C#.net, how to convert ASCII text into XML acceptable text?

2004-05-05 14:33:48
Shenan Hawkins wrote:

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

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

--
------------------------------------------------------------------
  Jirka Kosek     e-mail: jirka(_at_)kosek(_dot_)cz     http://www.kosek.cz
------------------------------------------------------------------
  Profesionální školení a poradenství v oblasti technologií XML.
        Úvod do XML 3.5.            DocBook 18.-19.5.
        XSLT 24.-26.5.              XML pro vývojáře 7.-8.6.
------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>