Can you try to simply use
Code:
Dim result As Object = objXMLNode.CreateNavigator().Evaluate("*[(local-name(.)='CitationDocument') or (local-name(.)='JuvenileCitationDocument')]/msc:Citation/msc:Citee/msc:InCustodyIndicator = 'true'", objXMLNameSpaceManager)
and check whether result is as needed in the debugger/IDE?
As for the
VB cast, does
Code:
Dim value as Boolan = CType(objXMLNode.CreateNavigator().Evaluate("*[(local-name(.)='CitationDocument') or (local-name(.)='JuvenileCitationDocument')]/msc:Citation/msc:Citee/msc:InCustodyIndicator = 'true'", objXMLNameSpaceManager), Boolean)
give you the wanted result? That is the way used in the docs.
I think the approach should work, haven't tried to write working
VB code or checked the details against the XML snippet you have shown. Perhaps
https://docs.microsoft.com/en-us/dot...xpathnavigator helps you to find your way around the API or maybe someone else with better
VB.NET skills than I have can help with the details for your sample.