Hi, I am going nuts with this. Can you help me write a code to parse this
XML document. I need to get values from all the tags and assign them into
variables. See code below. The code is in VBScript.
Many thanks,
Roger.
<%
option explicit
response.expires = 0
Response.CacheControl = "no-cache"
response.buffer = true
Response.ContentType = "text/html"
Dim xmlString
xmlString = "<?xml version=""1.0""?>" & _
"<ResponseService Version=""2.3"">" & _
" <Header>" & _
" <Partner>UserName</Partner>" & _
" <Password>Password</Password>" & _
" <ServiceID>1</ServiceID>" & _
" </Header>" & _
" <ResponseList>" & _
" <Response SequenceNumber=""1"" Type=""ALA"" Format=""Text"">" & _
" <TransactionID>215980</TransactionID>" & _
" <OriginatingNumber>447900000000</OriginatingNumber>" & _
" <Time>200412181427</Time>" & _
" <Data>This is a message.</Data>" & _
" <Deliverer>1</Deliverer>" & _
" <Destination>12345</Destination>" & _
" <Operator>99999</Operator>" & _
" <Tariff>150</Tariff>" & _
" <SessionId>SessionID</SessionId>" & _
" <Tags>" & _
" <Tag Name=""Number"">12</Tag>" & _
" <Tag Name=""City"">Rome</Tag>" & _
" </Tags>" & _
" </Response>" & _
" </ResponseList>" & _
"</ResponseService>"
Dim XMLDoc, rootNode, Header, item, i, strSnowHeight, ResponseList
Set XMLDoc = Server.CreateObject("Microsoft.XMLDOM")
XMLDoc.async = False
XMLDoc.loadXML(xmlString)
Set rootNode = XMLDoc.documentElement
Dim Partner, Password, ServiceID, TransactionID, OriginatingNumber, Time,
Data
Dim Deliverer, Destination, Operator, Tariff, SessionId, Number, City
'CAN YOU HELP ME WITH THE CODE TO PARSE VALUES FROM THE ABOVE XML DOCUMENT
AND ASSIGN THEM TO THE VARIABLES BELOW?
Partner =
Password =
ServiceID =
TransactionID =
OriginatingNumber =
Time =
Data =
Deliverer =
Destination =
Operator =
Tariff =
SessionId =
Number =
City =