The XML version of Hello World!
XmlDocument doc = new XmlDocument();
doc.AppendChild(doc.CreateProcessingInstruction("x ml", "version=\"1.0\"
encoding=\"UTF-8\""));
XmlElement root = doc.CreateElement("root");
doc.AppendChild(root);
root.InnerText = "Hello world!";
Console.WriteLine(doc.OuterXml);
Console.Read();
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"schneider" <00**@0000.SPAM> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
The DocumentElement is always null? and is readonly?
How to I add node items to the root?
I'm try to create a document from nothing.
All the samples start by loading a string or file.
Thanks,
Schneider