PDA

View Full Version : XmlDoc to String


PEN
11-23-2010, 10:41 PM
So I have read in an XML doc and I want to convert it to a string.

http://netomatix.com/XmlFileToString.aspx

That post explains how to do it but I can't convert it to MXS for some reason. Don't know what I'm missing.

This code doesn't work

sw=dotNetClass "System.IO.StringWriter"
xw=dotNetObject "System.Xml.XmlTextWriter" sw
xmlDoc.writeTo xw
sw.toString()

denisT
11-23-2010, 11:00 PM
So I have read in an XML doc and I want to convert it to a string.



check OuterXml property of System.Xml.XmlDocument

PEN
11-24-2010, 12:58 AM
Wow thanks Denis. Why in the world didn't I find that in any searches and why in the world didn't I try that!

Thanks again.

CGTalk Moderation
11-24-2010, 12:58 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.