oXML = Server.CreateObject("Msxml2.DOMDocument.4.0")
oNode = oXML.createElement("CommonCustomerSearch")
can someone explain what the lines of code above are doing? i’m more interested in the first line as the method it is written in exits when it hits that line, so apparently the variable oXML isn’t being set. i know that oXML is supposed to be set to some kind of COM object but can you explain the “Msxml2.DOMDocument.4.0” part a bit more? what is that, where is that, and what will it look like in .NET (this code is a classic asp)? i don’t know what the second line of code above is either but the method never even reaches it so if you have any ideas about what that is doing would be great too. thanks
That classic ASP code is making use of the XML DOM library. The first line (if properly coded with the
setkeyword) creates an XML document in memory. The second line creates an XML node namedCommonCustomerSearch..NET Framework 3.5+
If you want to move to .NET 3.5 or later, you could do the same thing with System.Linq.Xml
You can read the Getting Started Guide for LINQ to XML for more info.
.NET Framework 2.0
It sounds like you’re limited to .NET 2.0, so you can use System.Xml to accomplish this in a less sexy way.