gautammalkani
Technical User
Hi All
I can read an XML file from a web browser (for user& password verifcation for online users) but I would like to read in the contents from a particular element. Here is my attached code and the XML file:
Sub connectToHTTP()
Dim xml
Set xml = CreateObject("Microsoft.XMLHTTP")
' Opens the connection to the remote server.
xml.Open "GET", " False
' Actually Sends the request and returns the data:
xml.send
Range("A20").Value = xml.responseText
End Sub
How do i read in a particular element ie message code since I want to query on a particular value?
XML FILE:
<?xml version="1.0" encoding="UTF-8" ?>
- <logon-service>
- <results>
<message-code>-1</message-code>
<message-text>Invalid Logon</message-text>
<sid>NULL</sid>
</results>
</logon-service>
Appreciate any help. Cheers
Gautam
I can read an XML file from a web browser (for user& password verifcation for online users) but I would like to read in the contents from a particular element. Here is my attached code and the XML file:
Sub connectToHTTP()
Dim xml
Set xml = CreateObject("Microsoft.XMLHTTP")
' Opens the connection to the remote server.
xml.Open "GET", " False
' Actually Sends the request and returns the data:
xml.send
Range("A20").Value = xml.responseText
End Sub
How do i read in a particular element ie message code since I want to query on a particular value?
XML FILE:
<?xml version="1.0" encoding="UTF-8" ?>
- <logon-service>
- <results>
<message-code>-1</message-code>
<message-text>Invalid Logon</message-text>
<sid>NULL</sid>
</results>
</logon-service>
Appreciate any help. Cheers
Gautam