How do I copy specific node with children from one document into a new document?
-
I am really stuck on this one. I have ObjXmlSimpleTypeDoc object which have two EnumerationValues. Each of EnumerationValue have child nodes. I want to got values from child nodes of the correct EnumerationValue node. To find the correct EnumerationValue I use the value in the variable strCourtNCIC. If the value in strCourtNCIC matches a EnumerationValue @code, that is the EnumerationValue I need. For this question strCourtNCIC hold a value MN010015J. How do I do this in VB.NET? Here is the objXmlSimpleTypeDoc object where I need to find EnumerationValue with @code = strCourtNCIC (MN010015J)
Emily County 111 Emily 724-820-7123 Pope County 112 Pope
Here is the VB.NET code that I need help with to just get the correct EnumerationValue with @code that matches strCourtNCIC (MN010015J).
'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")