oXML = Server.CreateObject("Msxml2.DOMDocument.4.0")
oNode = oXML.createElement("CommonCustomerSearch")
oRoot = oXML.appendChild(oNode)
有人可以发布与上述代码行相当的.NET 2.0吗?我实际上发现了一些似乎是我正在寻找的示例代码,但我相信它使用的是.NET_4类。我需要2.0的解决方案。
答案 0 :(得分:3)
using System.Xml;
XmlDocument oXML = new XmlDocument();
XmlElement oNode = oXML.CreateElement("","CommonCustomerSearch","");
XmlNode oRoot = oXML.AppendChild(oNode);
答案 1 :(得分:0)
使用VB.NET就像......
Imports System.Xml
Dim oXML as XmlDocument = new XmlDocument
Dim oNode as XmlElement = oXML.CreateElement("","CommonCustomerSearch","")
Dim oRoot as XmlNode = oXML.AppendChild(oNode)
希望这有助于......