http://www.banxico.org.mx/DgieWSWeb/...eCambioBanxico
Con este codigo:
Código ASP:
Ver original
<% cadenaXML = "<env:Envelope xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/""" cadenaXML = cadenaXML & " xmlns:xsd=""http://www.w3.org/2001/XMLSchema""" cadenaXML = cadenaXML & " xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/""" cadenaXML = cadenaXML & " xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">" & vbCrLf cadenaXML = cadenaXML & " <env:Header>" & vbCrLf cadenaXML = cadenaXML & " </env:Header>" & vbCrLf cadenaXML = cadenaXML & " <env:Body env:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"">" & vbCrLf cadenaXML = cadenaXML & " <m:tiposDeCambioBanxico xmlns:m=""http://ws.dgie.banxico.org.mx"">" & vbCrLf cadenaXML = cadenaXML & " </m:tiposDeCambioBanxico>" & vbCrLf cadenaXML = cadenaXML & " </env:Body>" & vbCrLf cadenaXML = cadenaXML & "</env:Envelope>" & vbCrLf Set objInputXMLDoc = Server.CreateObject("Microsoft.XMLDOM") response.write cadenaXML objInputXMLDoc.loadXML cadenaXML Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") objXMLHTTP.open "post", "http://www.banxico.org.mx/DgieWSWeb/DgieWS?operation.invoke=tiposDeCambioBanxico", false objXMLHTTP.setRequestHeader "Content-Type", "text/xml" objXMLHTTP.setRequestHeader "soapAction", "http://www.banxico.org.mx:80/DgieWSWeb/DgieWS" objXMLHTTP.send objInputXMLDoc response.write "<HTML><HEAD>" & vbCrLf response.write "</HEAD><BODY>" & vbCrLf Set objOutputXMLDoc = Server.CreateObject("Microsoft.XMLDOM") objOutputXMLDoc.loadXML objXMLHTTP.responseText Set Nodes = objOutputXMLDoc.getElementsByTagName("bm:DataSet") if Nodes.length > 0 then response.write "HASTA QUE "&Nodes.length&"<br>" For Each Node In Nodes response.write Node.selectSingleNode("ID").Text & "<br>" & vbCrLf Next else response.write "NI MAIZ "&Nodes.length&"<br>" response.write objXMLHTTP.responseText end if %>
Pero no se, algo esta mal, no se que poner para que me lea el valor del dolar , ojala me puedan ayudar, gracias