Using the following xml document, I need help in vb.net. I would like to set a variable (InCustody) to have value = 5 when /[JuvenileCitationDocument or CitationDocument]/Citation/Citee/InCustodyIndicator = True
How do I do this?
I am considering putting the xml document into an object e.g. objXMLInputDoc. This document (CitationDocumentBatch) will have or can have many CitationDocuments and or JuvenileCitationDocuments.
I will then look into this document for each CitationDocument and or JuvenileCitationDocument.
When I find InCustodyIndicator = true (a child element) of a CitationDocument or JuvenileCitationDocument then I want to set a variable to have 5 as it's value.
I will use this value later on.
<CitationDocumentBatch>
<CitationDocument>
<Incident>
<Citee>
<InCustodyIndicator>true</InCustodyIndicator>
</Citee>
</Citation>
</CitationDocument
<CitationDocumentBatch>
<JuvenileCitationDocument >
<Incident>
<Citee>
<InCustodyIndicator>true</InCustodyIndicator>
</Citee>
</Citation>
</JuvenileCitationDocument
</CitationDocumentBatch>
What I have tried:
I am considering putting the xml document into an object e.g. objXMLInputDoc. This document (CitationDocumentBatch) will have or can have many CitationDocuments and or JuvenileCitationDocuments.
I will then look into this document for each CitationDocument and or JuvenileCitationDocument.
When I find InCustodyIndicator = true (a child element) of a CitationDocument or JuvenileCitationDocument then I want to set a variable to have 5 as it's value.
I will use this value later on.