Why am I able to get text from one XML node but not its siblings?

Prauvs

New Member
Why am I able to get text from one XML node but not its siblings? I must be doing something wrong now, I actually had it working at one point but I was choosing the wrong sibling at the time. This code below returns AND writes the strRespone to my source code. But I get error '' on the next one.Error:Microsoft VBScript runtime error '800a01a8'Object required/preview.asp, line 905 ( Line: strAuthCode = strBMLAuthCode.text )Code:\[code\]Dim NodeList, Node, SubNodeSet NodeList = xmlDom.documentElement.selectNodes("litleonlineresponse/authorizationresponse")Set strBMLResponse = xmlDom.SelectSingleNode("//response") strResponse = strBMLResponse.text Response.Write "<!--strResponse: " & strResponse & "-->"If strResponse = "000" Then '//SUCCESS!! Set strBMLAuthCode = xmlDom.SelectSingleNode("//litletxnid") strAuthCode = strBMLAuthCode.text Response.Write "strAuthCode: " & strAuthCode & "<br>" Set strBMLAcctNum = xmlDom.SelectSingleNode("//number") strAcctNum = strBMLAcctNum.text Response.Write "strAcctNum: " & strAcctNum & "<br>" strCCNum = strAcctNumElse ' if strResponse <> '000'...\[/code\]and last but certainly not least the XMLXML:\[code\]<litleonlineresponse version="8.0" response="0" message="Valid Format"><authorizationresponse id="0000000900" reportgroup="xxxx"> <litletxnid>111111111111111111</litletxnid> <orderid>121212121212122</orderid> <response>000</response> <responsetime>2012-09-04T13:02:46</responsetime> <postdate>2012-09-04</postdate> <message>Approved</message> <authcode>9999999</authcode> <accountinformation> <type>BL</type> <number>89345734678905</number> </accountinformation> <fraudresult> <avsresult>34</avsresult> </fraudresult> <billmelaterresponsedata> <bmlmerchantid>908739085734059058</bmlmerchantid> </billmelaterresponsedata></authorizationresponse></litleonlineresponse>\[/code\]I scrambled the actual values in the xml for our security.Thanks!
 
Back
Top