View Single Post
  #5 (permalink)  
Old August 9th, 2018, 11:19 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

Originally Posted by Martin Honnen View Post
Can you try to simply use
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
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 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.
I do appreciate your help. I will look around and play with my code until it works.
Reply With Quote