Hello, I created my own xmlTree with this last instruction:
Xml_doc.AppendChild(xml_root);
it is in this way:
Now I need to modify it: for example I need to add in this way:
How can I do this? Do I have to re-build the tree???
thanks.
I tried in this way, but It insert only
after . Why? isn't it strange?change a xmlTree
EDIT: ------------------------------------------
XmlElement head = Xml_doc.CreateElement("head");
XmlNode body = xml_root.FirstChild;
xml_root.RemoveAll();
xml_root.AppendChild(head);
xml_root.AppendChild(body);
Xml_doc.AppendChild(xml_root);
MarcoPosted Jan 20, 2008, 7:08 PM
With this code below, inside output.html I see '<' and '>' insetead of < and >
How can I solve? Thanks.
XmlTextWriter xmlW = new XmlTextWriter("..\\..\\output.html", null);
xmlW.Formatting = Formatting.Indented;
pdom.Xml_doc.WriteContentTo(xmlW);
xmlW.Close();
EDIT --
the problem is that, in xml_doc, I have attached to one tag (as innerTEXT) a string (which contains some tags...!!!! and those tags get me the < problem in output file)....