By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,168 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,168 IT Pros & Developers. It's quick & easy.

XML encoding using C#

P: n/a
I've a string which needs to be converted to valid XML string. The original
string might have characters such as "%", "!", "+", etc.
Is there any function available in C# that could do this?
Thanks,
Gilgamesh
Mar 31 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Research the XmlTextWriter class.

<%= Clinton Gallagher

"Gilgamesh" <gi************@aol.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I've a string which needs to be converted to valid XML string. The
original string might have characters such as "%", "!", "+", etc.
Is there any function available in C# that could do this?
Thanks,
Gilgamesh

Mar 31 '06 #2

P: n/a
This is good, but how do I keep this XML document in memory? This class
requires an output file and, in my case, I can't have any output file. The
XML stream is to be passed to another class using parameters.
_G

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:ew**************@TK2MSFTNGP14.phx.gbl...
Research the XmlTextWriter class.

<%= Clinton Gallagher

"Gilgamesh" <gi************@aol.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I've a string which needs to be converted to valid XML string. The
original string might have characters such as "%", "!", "+", etc.
Is there any function available in C# that could do this?
Thanks,
Gilgamesh


Mar 31 '06 #3

P: n/a
Your first RFI didn't ask for help designing your application. Since there's
several ways to answer your latest question perhaps asking at
news://microsoft.public.dotnet.xml will attract the attention of somebody
who knows an optimal solution.

<%= Clinton Gallagher

"Gilgamesh" <gi************@aol.com> wrote in message
news:e1**************@TK2MSFTNGP10.phx.gbl...
This is good, but how do I keep this XML document in memory? This class
requires an output file and, in my case, I can't have any output file. The
XML stream is to be passed to another class using parameters.
_G

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:ew**************@TK2MSFTNGP14.phx.gbl...
Research the XmlTextWriter class.

<%= Clinton Gallagher

"Gilgamesh" <gi************@aol.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I've a string which needs to be converted to valid XML string. The
original string might have characters such as "%", "!", "+", etc.
Is there any function available in C# that could do this?
Thanks,
Gilgamesh



Mar 31 '06 #4

P: n/a

you can use the XMLTextWriter to write to a memorystream

hth,
Alan.

Mar 31 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.