Hey there,
I'm having trouble with writing a System.Xml.XmlElement to disk using C# .NET.
This is what I'm trying to do at the moment and failing:
XmlWriterSettings oSettings = new XmlWriterSettings();
oSettings.Indent = true;
oSettings.OmitXmlDeclaration = false;
oSettings.Encoding = Encoding.ASCII;
XmlWriter writer = XmlWriter.Create(@"C:\xmlfile.xml", oSettings);
System.Xml.XmlElement xml = sc.WFCFunctionCall();
xml.WriteContentTo(writer2);
the variable 'xml' definitely contains valid XML, I've stopped in the debugger and inspected.
xml.WriteTo(writer2)
also does not work.
Is there a simple way of doing this?
Cheers! Nick.