Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading XML file with Classic ASP and IIS 7

Status
Not open for further replies.

stinkybee

Programmer
May 15, 2001
218
GB
I have just migrated to a Windows 7 IIS 7 setup and am trying to get some classic ASP code working to load an XML file. This is the code that used to work on my Windows XP setup:

Code:
set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")

xmlDoc.async="false"
xmlDoc.load(Server.MapPath("mysite/test.xml"))
Set getMainNode = xmlDoc.getElementsByTagName("MainNode")

First of all it wasn't creating the XML object so I had to change the first line to:

Code:
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")

Now there are no errors but there is nothing in the getMainNode object. Previsouly I was looping through this and adding some stuff to a database etc like so:

Code:
For i = 0 To (getMainNode.Length - 1)  
    ....
next


Now getMainNode has a length of 0 and I have no idea why. Any help on this would be appreciated.
 
Problem solved.

It appeared to be a sharing issue. Sharing the individual xml file with everyone seems make it work now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top