简体   繁体   中英

ASP/VB6 to .Net 2.0

oXML = Server.CreateObject("Msxml2.DOMDocument.4.0")
oNode = oXML.createElement("CommonCustomerSearch")
oRoot = oXML.appendChild(oNode)

Looking for the equivalent for the code above in .Net 2.0. I found some sample code that seemed to be what I was looking for, but I believe it was using .NET_4 classes. I need a solution for 2.0.

Can someone post a .NET 2.0 equivalent of the above lines of code?

using System.Xml;
XmlDocument oXML = new XmlDocument();
XmlElement oNode = oXML.CreateElement("","CommonCustomerSearch","");
XmlNode oRoot = oXML.AppendChild(oNode);

using VB.NET would be something like ...

Imports System.Xml
Dim oXML as XmlDocument = new XmlDocument
Dim oNode as XmlElement = oXML.CreateElement("","CommonCustomerSearch","")
Dim oRoot as XmlNode = oXML.AppendChild(oNode)

hopefully this helps ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM