Problema con Microsoft XMLDOM
Hola, la cuesti贸n es la siguiente. Mediante un c贸digo que me he bajado, hago el upload de un archivo xml a un directorio del servidor. Concretamente al hacer
response.write Server.MapPath("../datos")
me indica que el fichero est谩 en e:websxxxdatos
Fisicamente el fichero est谩 alli
El nombre del fichero lo tengo guardado en una variable
La cuesti贸n es que ahora voy cargar ese documento mediante XMLDOM con el siguiente codigo
Set xmlObj = Server.CreateObject("Microsoft.XMLDOM")
xmlObj.Async = False
xmlObj.validateOnParse = False
response.write ("<br>"&Server.MapPath("../datos/"&nombreFichero))
If xmlObj.Load(Server.MapPath("../datos/"&nombreFichero)) Then
' El documento se ha cargado correctamente.
DisplayNode xmlObj.childNodes,"",25,""
errores = "No han ocurrido errores"
Else
errores = "NO SE HA PODIDO CARGAR EL ARCHIVO"
End If
Al hacer el load nuca se carga el archivo. Esta en la ubicaci贸n correcta, pero la variable errores siempre me dice que hay problemas
Alguno sabe que puede estar pasando ?
acabo de probar con esto para ver si me da alguna pista, pero nada
response.write ("<br>" & xmlObj.parseError.errorCode)
response.write ("<br>" & xmlObj.parseError.reason)
response.write ("<br>" & xmlObj.parseError.line)
lo que me dice es
ERROR: -2146697210
RAZON: The system cannot locate the object specified.
LINEA: 0
response.write Server.MapPath("../datos")
me indica que el fichero est谩 en e:websxxxdatos
Fisicamente el fichero est谩 alli
El nombre del fichero lo tengo guardado en una variable
La cuesti贸n es que ahora voy cargar ese documento mediante XMLDOM con el siguiente codigo
Set xmlObj = Server.CreateObject("Microsoft.XMLDOM")
xmlObj.Async = False
xmlObj.validateOnParse = False
response.write ("<br>"&Server.MapPath("../datos/"&nombreFichero))
If xmlObj.Load(Server.MapPath("../datos/"&nombreFichero)) Then
' El documento se ha cargado correctamente.
DisplayNode xmlObj.childNodes,"",25,""
errores = "No han ocurrido errores"
Else
errores = "NO SE HA PODIDO CARGAR EL ARCHIVO"
End If
Al hacer el load nuca se carga el archivo. Esta en la ubicaci贸n correcta, pero la variable errores siempre me dice que hay problemas
Alguno sabe que puede estar pasando ?
acabo de probar con esto para ver si me da alguna pista, pero nada
response.write ("<br>" & xmlObj.parseError.errorCode)
response.write ("<br>" & xmlObj.parseError.reason)
response.write ("<br>" & xmlObj.parseError.line)
lo que me dice es
ERROR: -2146697210
RAZON: The system cannot locate the object specified.
LINEA: 0
Agrega esta l铆nea -entre la 2 y la 3 de tu ejemplo-:
xmlObj.setProperty "ServerHTTPRequest", true
Terminar谩n tus problemas
La explicaci贸n aqu铆:
http://support.microsoft.com/default.aspx?scid=kb;es;281142#kb2
SIi ves esta respuesta, un tanto tard铆a y te ha servido te ruego me lo hagas saber a mi correo
xmlObj.setProperty "ServerHTTPRequest", true
Terminar谩n tus problemas
La explicaci贸n aqu铆:
http://support.microsoft.com/default.aspx?scid=kb;es;281142#kb2
SIi ves esta respuesta, un tanto tard铆a y te ha servido te ruego me lo hagas saber a mi correo
