Option Explicit
Private Sub Command1_Click()
Const HttpPath = "http://111.111.111.111/service.asmx/Doc"
Dim xmlDoc As Object
Dim strRequest As String
Dim XMLhttp As MSXML2.XMLHTTP30
Dim sSend
Set XMLhttp = New MSXML2.XMLHTTP30
sSend = "RLOC=" & Me.Text1.Text
XMLhttp.open "POST", HttpPath, False
XMLhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
XMLhttp.send sSend
Me.Text2 = XMLhttp.responseText
Me.Text2 = response
Dim doc As DOMDocument
Set doc = New DOMDocument '동적메모리 설정
Dim objNodeList As IXMLDOMNodeList
doc.async = False
doc.loadXML (response)
Set objNodeList = doc.getElementsByTagName("Root")
If objNodeList.length Then
Me.Text3 = Me.Text3 & objNodeList.Item(0).selectSingleNode("Name").nodeTypedValue & ", "
Me.Text3 = Me.Text3 & objNodeList.Item(0).selectSingleNode("age").nodeTypedValue & ", "
Me.Text3 = Me.Text3 & objNodeList.Item(0).selectSingleNode("address").nodeTypedValue & ", "
Me.Text3 = Me.Text3 & objNodeList.Item(0).selectSingleNode("phonnumber").nodeTypedValue & ", "
End If
End Sub