Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How do I copy specific node with children from one document into a new document?

How do I copy specific node with children from one document into a new document?

Scheduled Pinned Locked Moved Visual Basic
questionhelpcsharpcom
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11369001
    wrote on last edited by
    #1

    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")

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups