Tuesday, June 26, 2007

Load and LoadXML in ASP

Dim objDOM
Dim blnOutput
objDOM = Server.CreateObject("MSXML2.DOMDocument.4.0")

blnOutput = objDOM.Load(Server.MapPath(XMLFileName))
blnOutput = objDOM.Load(StringXML)

The main difference between Load and LoadXML is that the Load takes XML file as input while LoadXML takes the XML string itself as input. Both Load and LoadXML returns a boolean value indicating if the XML was loaded successfully or not into the DOM.

1 comment:

  1. Last line should be:
    blnOutput = objDOM.LoadXML(StringXML)