XmlDocumentdo
c = new XmlDocument();
XmlNode cont =do
c.CreateElement("Container"
;
doc.AppendChild(cont);
XmlDocument stuff = new XmlDocument();
stuff.Load("product.xml"
;
XmlNode imported =
do
c.ImportNode(stuff.DocumentElement, true);
doc.DocumentElement.AppendChild(imported);
stuff.Load("material.xml"
;
imported =do
c.ImportNode(stuff.DocumentElement, true);
doc.DocumentElement.AppendChild(imported);
Console.WriteLine(doc.InnerXml);
XmlWriter tw = new XmlTextWriter(Console.Out);
tw.WriteStartDocument();
tw.WriteStartElement("Container"
;
XmlTextReader reader = new XmlTextReader("product.xml"
;
tw.WriteNode(reader, true);
reader = new XmlTextReader("material.xml"
;
tw.WriteNode(reader, true);
tw.WriteEndElement();
tw.WriteEndDocument();
delphi的tXMLDOMDocument中好像没有提供这些方法(ImportNode)