i'm trying to get the node value in an XML Response. I'm very new to ASP.
Here is the XML:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
<soap:Body>
<ns2:getTextoTsjResponse xmlns:ns2="http://x.com/x/act" xmlns:ns3="http://i.e.com" xmlns:ns4="http://comun.e.com">
<return>
<ns3:texto>
<ns3:datos>
<xop:Include href="cid:[email protected]" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns3:datos>
<ns3:extension>pdf</ns3:extension>
</ns3:texto>
<ns3:textoAnonimizado>
<ns3:datos>
<xop:Include href="cid:[email protected]" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns3:datos>
<ns3:extension>pdf</ns3:extension>
</ns3:textoAnonimizado>
</return>
</ns2:getTextoTsjResponse>
</soap:Body>
</soap:Envelope>
I succeded geting the XMLDoc and parse. What im trying to do then is get href values within node.
Here is the ASP code.
'Response from server with the XML
xmlParseado = response.Text
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
xmlDoc.loadXML(xmlParseado)
if xmlDoc.parseError.errorcode <> 0 then
Response.Write("XML Error...<br>")
else
Call xmlDoc.setProperty("SelectionLanguage", "XPath")
Call xmlDoc.setProperty("SelectionNamespaces", "xmlns:ns3")
Dim node
'Here im trying to get href value from <ns3:datos> node.
Set node = xmlDoc.selectSingleNode("//ns3:texto//ns3:datos//*")
If (node Is Nothing) Then
Response.write "nothing"
Else
response.write(TypeName(node) & "<br />")
End If
end if
Some help would be apreciated.
Thanks in advance