Search code examples
asp.netvb.netvb6asp-classic

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?


Solution

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