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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client side XML works but server side does not

Status
Not open for further replies.

MarcusH

Programmer
May 3, 2001
22
GB
Hi,

I'm having a problem with getting code which works on the client side to work on the server in ASP.

This code works:

<script language=&quot;VBScript&quot;>

set xmldoc = CreateObject(&quot;Microsoft.XMLDOM&quot;)
xmldoc.async=False
xmldoc.Load (&quot;clientList.xml&quot;)

set element = xmldoc.getElementsByTagName(&quot;clients&quot;)

for each theItem in element
document.write theItem.getAttribute(&quot;lastName&quot;) &&quot;<br>&quot;
next

</script>

But this does not

<%
Response.buffer=true
Response.ContentType=&quot;text/xml&quot;

set xmldoc = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xmldoc.async=False
xmldoc.Load Server.MapPath(&quot;clientList.xml&quot;)

set element = xmldoc.getElementsByTagName(&quot;clients&quot;)

for each theItem in element
Response.write theItem.getAttribute(&quot;lastName&quot;) &&quot;<br>&quot;
next

%>

Your help on this would be very much appreciated
Marcus





 
>> But this does not

How does it not work? Is there an error message?

This would be more appropriate in the ASP forum.
 
Ok thanks. I'll put this into the ASP forum along with the answer to your question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top