Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 8th, 2018, 11:53 PM
Authorized User
Points: 428, Level: 7
Points: 428, Level: 7 Points: 428, Level: 7 Points: 428, Level: 7
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2013
Posts: 94
Thanks: 13
Thanked 0 Times in 0 Posts
Default How Do I Set A Variable To Have Value= 5 Based On Conditions In Vb.Net?

Using the following xml document, I need help in vb.net. I would like to set a variable (e.g 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.

Code:
<CitationDocumentBatch>
	<CitationDocument>
		<Incident>
			<Citee>
				<InCustodyIndicator>true</InCustodyIndicator>
			</Citee>
		</Citation>
		</CitationDocument
	<CitationDocumentBatch>
	<JuvenileCitationDocument >
		<Incident>
			<Citee>
				<InCustodyIndicator>true</InCustodyIndicator>
			</Citee>
		</Citation>
	</JuvenileCitationDocument
</CitationDocumentBatch>

Last edited by winkimjr2; August 9th, 2018 at 08:41 AM. Reason: I explained in more detail what I am would like to do in vb.net
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic line wrapping based on conditions-Need expert help sen1953 XSLT 1 July 30th, 2013 02:34 PM
Dynamic line wrapping based on conditions-Need expert help sen1953 XSLT 0 July 13th, 2013 07:28 AM
for-each conditions based on row selections santhakumar XSLT 0 July 12th, 2013 07:59 AM
skip creating tag based on conditions sudheer.raju XSLT 3 December 20th, 2011 05:56 AM
selection based on conditions rajesh_css XSLT 3 October 2nd, 2008 08:06 PM



All times are GMT -4. The time now is 07:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.