PRETTY PLEASE...need answer to why "this method should result in NodeSet" error

Discussion in 'ASP .Net' started by KathyB, Jul 25, 2003.

  1. KathyB

    KathyB Guest

    Hi,

    Using the following in an asp.net procedure. I get the error "The
    expression passed to this method should result in a NodeSet".

    Dim xDoc As New Document()

    The line causing the error is:

    Dim n as XmlNode = xDoc.SelectSingleNode("//Station[@name]="Station1"]/WI/[Boards/Board[@sn="12345"][@finish]][last()]/@order")

    I need to retrieve the content of the "order" attribute of the WI
    element for the last "finished" board with the specified serial
    number. The path works in xpathvisualizer, but I'm doing something
    wrong with the NodeSet issue and/or how I'm using this in asp.net
    code. Fairly new at this, so please bear with me. I've tried looking
    this up but still not seeing where it's going wrong.

    If there is no match, shouldn't it at least return a null nodeset?

    Thanks, Kathy

    p.s. sorry this is a bit of a repost but I'm held up until I can solve
    this.
     
    KathyB, Jul 25, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vamp4l
    Replies:
    8
    Views:
    421
    EdwardH
    Sep 19, 2005
  2. MooMaster

    Regex help...pretty please?

    MooMaster, Aug 23, 2006, in forum: Python
    Replies:
    4
    Views:
    331
    vbgunz
    Aug 24, 2006
  3. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    997
    Mark Rae
    Dec 21, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,269
    Smokey Grindel
    Dec 2, 2006
  5. Sparticus
    Replies:
    10
    Views:
    146
    J├╝rgen Exner
    Mar 10, 2006
Loading...

Share This Page