XPath - Checking if a node Exists

Results 1 to 2 of 2

Thread: XPath - Checking if a node Exists

  1. #1
    orix Guest

    Default XPath - Checking if a node Exists

    I&#039ve got this ASP code that looks for nodes with specific content, for example:<BR>set myNode = XMLParent.selectSingleNode("//child::Category[ID=15]")<BR>how can i determine if this node REALY exists???<BR>myNode IS an object, even if no node was found!!??!!

  2. #2
    Matiur Rahman Guest

    Default RE: try to Capture the nodeName like..

    dim strName<BR>on error resume next<BR> strName=myNode.nodeName<BR> if err.number&#060;&#062;0 then<BR> Response.write "Node does not exist"<BR> else<BR> Response.write "Node exist"<BR> end if<BR>I used the same concept in ASP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts