I'm navigating an XML file to grab some variables from it.

I'm finding that if a particular node isn't found, instead of giving me an
error, it dumps the raw HTML back.

This is the particular expression:

dim expr as System.Xml.XPath.XPathExpression = xpn.Compile("//" &
variableToReturn & "[../pageID = '" & pageID & "']")

So, for instance, I want to get the CONTENTID of the node that also has a
PAGEID of 7.

If I pass the variables in, and there is a node with a PAGEID of 7, then it
returns the value of the CONTENTID.

However, if there *isn't* a node with a PAGEID of 7, instead of an error, it
dumps the entire XML file as a string.

Now, I can obviously check for this by seeing if the value returned is over
200 characters or something, but that seems like a hack and that there must
be a better way of doing this.

-Darrel