Salve, vorrei leggere un file xml da un server remoto,
In locale funziona con questo script:
<html>
<head>
<title>Leggere un file XML con ASP</title>
</head>
<body>
<%
Dim objXmlDom
Set objXmlDom = Server.CreateObject("Microsoft.XMLDOM")
objXmlDom.async = False
objXmlDom.load Server.MapPath("database.xml")
Dim nome, cognome
Set nome = objXmlDom.getElementsByTagName("record/nome")
Set cognome = objXmlDom.getElementsByTagName("record/cognome")
Dim i
i = 0
For i = 0 To nome.length - 1
Response.Write nome(i).Text & " " & cognome(i).Text & "<br>"
Next
Set nome = Nothing
Set cognome = Nothing
Set objXmlDom = Nothing
%>
</body>
</html>
Vorrei leggerlo da remoto, ho modificato la stringa
objXmlDom.load Server.MapPath("database.xml")
in
objXmlDom.load ("http://www.sito.it/public/database.xml")
non m i da errore... solo che non mi visualizza niente....
la pagina che mi da è questa:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv="Content-Type" content="text/html; charset=windows-1252"></HEAD>
<BODY>
</BODY>
</HTML>
Suggerimenti?
Gab ;-)

Rispondi quotando

