K
KathyB
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.
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.