decode XmlDocument.OuterText
-
hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon
-
hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon
Try this: StringWriter sw = new StringWriter(); XmlTextWriter xw = new XmlTextWriter(sw); xmlDoc.WriteTo(xw); return sw.ToString(); where xmlDoc is your xml doc Let me know if it works
-
hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon
How about OuterXml ?
-
hi, Simple question. I'm trying to get the xml in an XmlDocument variable into a string. Seems like its a tough thing and I tried the OuterText property but it gives me encoded text like : >< So, does anybody have a decent solution to this. Thanks Gideon
nope, both solutions have encoded text!