Sub PullFromInternet()
'The web address at which xml is stored
URL = "http://jjh.virtual.vps-host.net:8080/restdemo/services/customers/0"
Dim HttpReq As Object
'Declare the request for information over the internet
Set HttpReq = New WinHttpRequest
'Specify the type of HTTP request
HttpReq.Open "GET", URL, False
'or use GET instead of POST
'Specify the type of content that can be recieved
HttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'Send the actual request
HttpReq.Send
'HttpReq.send postmydata
'Note - if using GET set postmydata to ""
Dim response As String
Dim tag As String
Dim data As String
tag = "address"
response = HttpReq.ResponseText
MsgBox (extractor(tag, response))
End Sub
Function extractor(tag As String, response As String) As String
Dim tagLength As Integer
Dim mypos As Integer
Dim myposEnd As Integer
mypos = InStr(1, response, "<" & tag)
myposEnd = InStr(1, response, "<" &"/" & tag)
tagLength = Len(tag) + 2
Dim address As String
extractor = Mid(response, mypos + tagLength, (myposEnd - mypos - tagLength))
End Function
Monday, October 26, 2009
XML Extractor
Subscribe to:
Post Comments (Atom)
Checkmark in Office Products
Font: Wingding, ALT 0525: ✓ Note that the Unicode for that to be able to see it in HTML is ✓ Note that the Blogger...
-
In a regular annotation note, create a stack that looks the way you like. It will take a couple of trial and error attempts since there'...
-
See https://www.extendoffice.com/documents/excel/1697-excel-split-word-into-letters.html In a blank cell next to your data, C1 for instanc...
No comments:
Post a Comment