Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display XML attributes?

Status
Not open for further replies.

rhewston

Programmer
Joined
Mar 31, 2011
Messages
2
Location
GB
I am using aspx to send a XML request to an ‘engine’ which will send me back a response:
<%
Dim URL
Dim XMLHTTP
Dim sRequest
Dim sServerNode
Dim URLEncoder
Dim result

‘**** XML Data ****
sRequest = "<eLoginRequest ClientType='Win32' CurrentSAP='0' Locale='eng'><FieldInputList><FieldInput Field='username'>Richard</FieldInput><FieldInput Field='password'>D41D8CD98F00B204E9800998ECF8427E</FieldInput></FieldInputList></eLoginRequest>"
sServerNode = "<Engine Name='Engine'><Transport Type='DCOM'><Server>localhost</Server></Transport></Engine>"

‘**** Engine URL ****
url = "
xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open ("Get", url, false)
xmlhttp.send ("ServerNode=" & Server.URLEncode(sServerNode) & "&Request=" & Server.URLEncode(sRequest))

**** Writes the XML response to the page *****
Response.write (xmlhttp.responseText)

**** To be used to get the XML Attributes *****
xmlDoc= xmlhttp.responseXML

%>

The XML Response sent back is:

<eLoginResponse Timestamp="2011-03-31T16:01:24" SessionID="BCFEC70C-55CD-45A2-A34C-60301EEB7D5C" OldestDeletion="2011-03-21T21:31:10" UserID="Richard"><ClientData/></eLoginResponse>

How can I display the attributes above? i.e. SessionID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top