on 08-23-2007 5:21 AM
Hello Friends,
Could any help me to convert XML to String .This is b'coz I need to pass it to a database.
With Regards,
Raju.
Hi Just see this code
<b>How to convert xml file into a String object</b>
static string GetXmlString(string strFile)
{
// Load the xml file into XmlDocument object.
XmlDocument xmlDoc = new XmlDocument();
try
{
xmlDoc.Load(strFile);
}
catch (XmlException e)
{
Console.WriteLine(e.Message);
}
// Now create StringWriter object to get data from xml document.
StringWriter sw = new StringWriter();
XmlTextWriter xw = new XmlTextWriter(sw);
xmlDoc.WriteTo(xw);
return sw.ToString();
}
may be help you !!
Thanks!
Pls reward if useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raju,
I think you are trying to convert your XML message into Text file. If so then you have to use Content conversion paramaters at receiver communication channel.
Thanks,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
could you please explain it a bit more?what you exactly wanna do
thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.