views:

20

answers:

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

can someone post a .NET 2.0 equivalent of the above lines of code please? i actually 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.

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

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 ...

aggietech