MSXML4 And SelectSingleNode

The following is a code snippet of a classic ASP webapplication:

Set l_oNode = p_oXML.selectSingleNode(l_sXPath)
If (Not IsNull(l_oNode)) Then
l_sValue = l_oNode.text
End If

the selectSingleNode method should return Null when no node was found for the XPath expression, but it doesn't. At least not in a way that satisfies the "Not IsNull()" test. The program always tries to execute l_sValue = l_oNode.text which obviously results in errors when the node was not found.

View Replies


ADVERTISEMENT

ASP XML SelectSingleNode Trouble

I'm having some trouble parsing an XML document I'm getting from my company's bank in response to a XML document I'm sending. Both docs are transferring fine, and in fact if the transaction in the document I send is accepted (valid credit card), everything parses perfectly.

The prob is when the transaction is not accepted by the bank server (invalid credit card), and the document that's returned to me has different tags. Code:

View Replies View Related

MSXML4 Typelib Constants Not Recognized In Server-side Script

I've created a web application with Visual Interdev and I've added Microsoft
XML, version 4 in project's references. A META tag has been successfully added
in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->

But when I write the following code in an ASP server-side javascript:

<p>Value: <% = SOMITEM_ELEMENT %></p>

I get a Microsoft VBScript error '800a01f4'. Undefined variable:
'SOMITEM_ELEMENT'

I don't get such an error with ADO constants (even though I didn't include
ADOJS.inc). Can someone tell me what's wrong?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved