View Single Post
  #1 (permalink)  
Old August 9th, 2018, 10:26 AM
winkimjr2 winkimjr2 is offline
Friend of Wrox
Points: 465, Level: 7
Points: 465, Level: 7 Points: 465, Level: 7 Points: 465, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2013
Posts: 101
Thanks: 14
Thanked 0 Times in 0 Posts
Default Expression must evaluate to a node-set.

I have a for each loop that I need help with. I am getting exception "Expression must evaluate to a node-set." when my if statement is executed.
What do I change in the if statement to fix this exception?

Note The objXMLNode can have either CitationDocument or JuvenileCitationDocument. In this particular case, there is only CitationDocument.

objXMLNode object has the following xml

<CitationDocument xmlns="">
			<IdentificationMethodText>Photo ID</IdentificationMethodText>
My for each loop

For Each objXMLNode In objXMLInputDoc.DocumentElement.SelectNodes("*[(local-name(.)='CitationDocument') or (local-name(.)='JuvenileCitationDocument')]")
    If CBool(objXMLNode.SelectSingleNode("*[(local-name(.)='CitationDocument') or (local-name(.)='JuvenileCitationDocument')]/msc:Citation/msc:Citee/msc:InCustodyIndicator = True", objXMLNameSpaceManager).InnerText) Then
        intPriority = 9
    End If
Reply With Quote