2010-09-10 66 views
0
oXML = Server.CreateObject("Msxml2.DOMDocument.4.0") 
oNode = oXML.createElement("CommonCustomerSearch") 
oRoot = oXML.appendChild(oNode) 

有人可以發佈上述代碼行的.NET 2.0等價物嗎?我實際上找到了一些示例代碼,似乎是我正在尋找的,但我相信它使用的是.NET_4類。我需要2.0的解決方案。asp/vb6到.net 2.0 - 幫助

回答

3
using System.Xml; 
XmlDocument oXML = new XmlDocument(); 
XmlElement oNode = oXML.CreateElement("","CommonCustomerSearch",""); 
XmlNode oRoot = oXML.AppendChild(oNode); 
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) 

希望這可以幫助...