Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > Forum and Wrox.com Feedback
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Forum and Wrox.com Feedback Post your suggestions for improving the Forums or Wrox.com or questions for the staff here. "Where can I find the code for my book?"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Forum and Wrox.com Feedback 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 Search this Thread Display Modes
  #1 (permalink)  
Old August 12th, 2019, 01:14 PM
Friend of Wrox
Points: 465, Level: 7
Points: 465, Level: 7 Points: 465, Level: 7 Points: 465, Level: 7
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2013
Posts: 101
Thanks: 14
Thanked 0 Times in 0 Posts
Default How do I find the correct node among many nodes that matches value in strcourt

I am really stuck on this one even though it seems like what I want is simple.
I have ObjXmlSimpleTypeDoc object which have two EnumerationValue nodes. Each of EnumerationValue have child nodes.

I want to find the correct EnumerationValue. To find the correct EnumerationValue node, I use a variable strCourtNCIC. If the value in strCourtNCIC (in this case MN010015J. This value can be some other value) matches a EnumerationValue@code, that is the EnumerationValue node I need.
For this question strCourtNCIC hold a value MN010015J.

How do I do this in VB.NET? My VB.NET code returns Nothing for objXmlEnumerationValueNode even though I am expecting to see the node with @code = MN010015J

Here is the objXmlSimpleTypeDoc object where I need to find EnumerationValue with @code = strCourtNCIC (MN010015J)
Code:
<SimpleTypeCompanion enumerates="CourtLocationTextType">
	<EnumerationValue code="MN010015J">
		<Text>Emily County</Text>
		<AssociatedValue type="MNCISNodeID">
			<Text>111</Text>
		</AssociatedValue>
		<AssociatedValue type="CountyName">
			<Text>Emily</Text>
		</AssociatedValue>
		<AssociatedValue type="PhoneNumber">
			<Text>724-820-7123</Text>
		</AssociatedValue>
	</EnumerationValue>
	<EnumerationValue code="DC19DAKDC">
		<Text>Pope County</Text>
		<AssociatedValue type="MNCISNodeID">
			<Text>112</Text>
		</AssociatedValue>
		<AssociatedValue type="CountyName">
			<Text>Pope</Text>
		</AssociatedValue>
	</EnumerationValue>
</SimpleTypeCompanion>
Here is the VB.NET code that I need help with to just get the correct EnumerationValue that matches strCourtNCIC (MN010015J).

Code:
'CourtNCIC 
strCourtNCIC = objXmlMNCISData.DocumentElement.SelectSingleNode("Case/Court/CourtNCIC").InnerText
'Access the CourtLocationTextType simple type. 
objXmlSimpleTypeDoc = Msc.Integration.CourtXml.Library.v4.SimpleType.GetCompanionFile("CourtLocationTextType")

'Get the correct EnumerationValue node that has @code =MN010015J string value
objXmlEnumerationValueNode = objXmlSimpleTypeDoc.SelectSingleNode("/SimpleTypeCompanion/EnumerationValue[@code=" + strCourtORI + "]/@code")
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Select nodes whose attribute matches another node's attribute? nikolai XSLT 5 April 18th, 2018 11:30 AM
How to delete node that matches combobox? QuadFather XML 2 April 8th, 2010 08:40 AM
Select correct child node richieWolf XSLT 4 September 24th, 2008 08:53 AM
Select first child node that matches criteria priya81 XSLT 4 July 3rd, 2007 10:32 AM
Select node whose child value matches Fantmx XSLT 5 February 16th, 2007 04:54 PM



All times are GMT -4. The time now is 06:49 AM.


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