Merging XML Nodes into another document

  • (2 Pages)
  • +
  • 1
  • 2

23 Replies - 858 Views - Last Post: 28 March 2012 - 12:37 PM Rate Topic: -----

#16 SPACEMTNMAN  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 25-June 09

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 05:09 AM

Okay everything is fie apart from one thing. tThe second XML file will not load as an Xdocument. it is saying i have multiple root elements. The error points towards this line

 <Parameter NAME="LRRShouldy" VALUE="110.377"/> 


Any ideas whats stopping it loading?
Was This Post Helpful? 0
  • +
  • -

#17 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 1959
  • View blog
  • Posts: 8,700
  • Joined: 29-May 08

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 06:57 AM

The 2nd file isn't a complete XML file, it missing tags and end tags.
Was This Post Helpful? 0
  • +
  • -

#18 SPACEMTNMAN  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 25-June 09

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 02:57 PM

Theyre not technically xml files they are vks files they just use xml syntax (or at least partially)
i can work around this because i can load it into a text box i just need some way of searching that text for a word then copying everything before it into a new file. im looking into that at the moment but if anyone knows about string functions and knows the snippet i need then dont hesitate to post :D
Was This Post Helpful? 0
  • +
  • -

#19 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 1959
  • View blog
  • Posts: 8,700
  • Joined: 29-May 08

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 03:32 PM

Let's get this right;-
1st is a VKS file
2nd is also a VKS file.

Do you have a link to more information about VKS

This post has been edited by AdamSpeight2008: 27 March 2012 - 03:34 PM

Was This Post Helpful? 0
  • +
  • -

#20 SPACEMTNMAN  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 25-June 09

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 03:53 PM

View PostAdamSpeight2008, on 27 March 2012 - 04:32 PM, said:

Let's get this right;-
1st is a VKS file
2nd is also a VKS file.

Do you have a link to more information about VKS



The vks file is a file created by a vicon motion capture system. It holds the data i provided in separate files.

They are both vks files yes and they are both loading fine all i need to get right now is the string functions.

Dim str As String
        Dim strArr() As String
        Dim count As Integer
        str = rtbtemp.Text
        Dim splitstring As String() = New String() {"</Skeleton>"}
        strArr = str.Split(splitstring, StringSplitOptions.None)

        For count = 0 To strArr.Length - 1
            rtbtemp.Text = strArr(count)
        Next

        Dim seconddivide As String = rtbtemp.Text

        
        str = rtbtemp.Text
        splitstring = New String() {"</Markers>"}
        strArr = str.Split(splitstring, StringSplitOptions.None)
        Dim firstdivide As String
        For count = 0 To strArr.Length - 1
            firstdivide = strArr(count)
        Next



        rtbtemp.Text = propsegmentbox.Text & "</Skeleton>" & vbNewLine & seconddivide & vbNewLine & propmarkerbox.Text & "</Markers>" & vbNewLine & firstdivide


Its messy coding and i cant keep track of how things are working right now.

Basically i want to split the string at the </skeleton> in the second file and move everything before that into a new string. Then i want to remove that from the text box. i then wat to split the remaining string at the word </Markers> and copy everything above that into a new string. and i then want to copy the remainder of the string into a new string. so

select Everything above </Skeleton> and copy into Firstdivide
Delete selection
Select everything in the remaining string above </Marker> and copy into Seconddivide
Delete Selection
Copy the remainder into ThirdDivide

Then Fill the rtbtemp.text with Firstdivide and propsegmentbox.text and Seconddivide and Propmarkerbox.text and Thirddivide thus piecing together each section in turn.

I am probably over complicating this.
Was This Post Helpful? 0
  • +
  • -

#21 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 1959
  • View blog
  • Posts: 8,700
  • Joined: 29-May 08

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 04:09 PM

Are sure that the second file you originally post actually loads into the software product you are using.
Was This Post Helpful? 0
  • +
  • -

#22 SPACEMTNMAN  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 25-June 09

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 04:25 PM

That...That is a good question. its a sample file in the documentation and i havent tried that. Im in the studio tomorrow so ill test that out ASAP!

EDIT: Just looked at some other vsk files and it seems the documentation has a partial vsk file instead of a full one. this is what a full file should look like.


<?xml version="1.0" standalone="yes"?>
	<KinematicModel>
		<Parameters>
			<Parameter NAME="InterHip" VALUE="117.383"/>
			<Parameter NAME="Thigh" VALUE="403.438"/>
			<Parameter NAME="Shin" VALUE="399.239"/>
			<Parameter NAME="Foot" VALUE="124.756"/>
			<Parameter NAME="Shoulder" VALUE="163.117"/>
			<Parameter NAME="ClavHeight" VALUE="238.517"/>
			<Parameter NAME="ShoulderHeight" VALUE="114.102"/>
			<Parameter NAME="UpperArm" VALUE="252.932"/>
			<Parameter NAME="LowerArm" VALUE="249.17"/>
			<Parameter NAME="FWTx" VALUE="71.9863"/>
			<Parameter NAME="LFWTy" VALUE="174.451"/>
			<Parameter NAME="LFWTz" VALUE="92.2766"/>
			<Parameter NAME="RFWTy" VALUE="-70.0021"/>
			<Parameter NAME="RFWTz" VALUE="79.3526"/>
			<Parameter NAME="LBWTx" VALUE="-114.624"/>
			<Parameter NAME="LBWTy" VALUE="152.232"/>
			<Parameter NAME="LBWTz" VALUE="74.5376"/>
			<Parameter NAME="RBWTx" VALUE="-118.508"/>
			<Parameter NAME="RBWTy" VALUE="-67.0875"/>
			<Parameter NAME="RBWTz" VALUE="66.2476"/>
			<Parameter NAME="LTHIx" VALUE="53.7618"/>
			<Parameter NAME="LTHIy" VALUE="62.3999"/>
			<Parameter NAME="LTHIz" VALUE="-280.83"/>
			<Parameter NAME="LKNEx" VALUE="30.0249"/>
			<Parameter NAME="LKNEy" VALUE="50.5755"/>
			<Parameter NAME="LKNEz" VALUE="-401.843"/>
			<Parameter NAME="LSHNx" VALUE="32.4538"/>
			<Parameter NAME="LSHNy" VALUE="60.6734"/>
			<Parameter NAME="LSHNz" VALUE="-300.824"/>
			<Parameter NAME="LANKx" VALUE="34.7539"/>
			<Parameter NAME="LHEEx" VALUE="-1.7685"/>
			<Parameter NAME="LHEEy" VALUE="4.24224"/>
			<Parameter NAME="LHEEz" VALUE="-31.7037"/>
			<Parameter NAME="LMT5y" VALUE="68.3389"/>
			<Parameter NAME="LTOEx" VALUE="112.31"/>
			<Parameter NAME="RTHIx" VALUE="-13.3369"/>
			<Parameter NAME="RTHIy" VALUE="-26.7741"/>
			<Parameter NAME="RTHIz" VALUE="-229.857"/>
			<Parameter NAME="RKNEx" VALUE="-13.3175"/>
			<Parameter NAME="RKNEy" VALUE="-28.9597"/>
			<Parameter NAME="RKNEz" VALUE="-401.843"/>
			<Parameter NAME="RSHNx" VALUE="-18.9532"/>
			<Parameter NAME="RSHNy" VALUE="-42.3367"/>
			<Parameter NAME="RSHNz" VALUE="-220.773"/>
			<Parameter NAME="RANKx" VALUE="-5.46938"/>
			<Parameter NAME="RHEEx" VALUE="-2.83421"/>
			<Parameter NAME="RHEEy" VALUE="5.96486"/>
			<Parameter NAME="RHEEz" VALUE="-51.4645"/>
			<Parameter NAME="RMT5y" VALUE="-38.1104"/>
			<Parameter NAME="RTOEx" VALUE="131.093"/>
			<Parameter NAME="TopSpinex" VALUE="-85.0327"/>
			<Parameter NAME="TopSpiney" VALUE="-0.938015"/>
			<Parameter NAME="TopSpinez" VALUE="352.453"/>
			<Parameter NAME="MidBackx" VALUE="-120.055"/>
			<Parameter NAME="MidBacky" VALUE="0.0544161"/>
			<Parameter NAME="MidBackz" VALUE="166.234"/>
			<Parameter NAME="LFHDx" VALUE="115.402"/>
			<Parameter NAME="LFHDy" VALUE="75.4635"/>
			<Parameter NAME="LFHDz" VALUE="100.047"/>
			<Parameter NAME="RFHDx" VALUE="120.139"/>
			<Parameter NAME="RFHDy" VALUE="-72.1525"/>
			<Parameter NAME="RFHDz" VALUE="100.868"/>
			<Parameter NAME="LBHDx" VALUE="-8.31294"/>
			<Parameter NAME="LBHDy" VALUE="76.9865"/>
			<Parameter NAME="LBHDz" VALUE="100.874"/>
			<Parameter NAME="RBHDx" VALUE="-26.307"/>
			<Parameter NAME="RBHDy" VALUE="-80.2964"/>
			<Parameter NAME="RBHDz" VALUE="100.055"/>
			<Parameter NAME="LSHOx" VALUE="-15.465"/>
			<Parameter NAME="LSHOy" VALUE="159.243"/>
			<Parameter NAME="LSHOz" VALUE="156.534"/>
			<Parameter NAME="LUPAx" VALUE="20.7503"/>
			<Parameter NAME="LUPAy" VALUE="58.2604"/>
			<Parameter NAME="LUPAz" VALUE="-156.166"/>
			<Parameter NAME="LFRMx" VALUE="-45.2357"/>
			<Parameter NAME="LFRMy" VALUE="45.7394"/>
			<Parameter NAME="LFRMz" VALUE="-130.343"/>
			<Parameter NAME="LWRx" VALUE="41.9606"/>
			<Parameter NAME="LFINx" VALUE="8.4977"/>
			<Parameter NAME="LFINy" VALUE="0.627522"/>
			<Parameter NAME="LFINz" VALUE="-90.5078"/>
			<Parameter NAME="RSHOx" VALUE="-11.9116"/>
			<Parameter NAME="RSHOy" VALUE="-134.35"/>
			<Parameter NAME="RSHOz" VALUE="150.589"/>
			<Parameter NAME="RUPAx" VALUE="19.4582"/>
			<Parameter NAME="RUPAy" VALUE="-40.9236"/>
			<Parameter NAME="RUPAz" VALUE="-69.7034"/>
			<Parameter NAME="RFRMx" VALUE="-41.8037"/>
			<Parameter NAME="RFRMy" VALUE="-26.5348"/>
			<Parameter NAME="RFRMz" VALUE="-184.477"/>
			<Parameter NAME="RWRx" VALUE="39.7822"/>
			<Parameter NAME="RFINx" VALUE="8.4945"/>
			<Parameter NAME="RFINy" VALUE="1.72251"/>
			<Parameter NAME="RFINz" VALUE="-83.6216"/>
			<Parameter NAME="Rootx" VALUE="-137.246"/>
			<Parameter NAME="Rooty" VALUE="30.6387"/>
			<Parameter NAME="Rootz" VALUE="77.9829"/>
			<Parameter NAME="LowerBackx" VALUE="-155.267"/>
			<Parameter NAME="LowerBacky" VALUE="44.2345"/>
			<Parameter NAME="LowerBackz" VALUE="197.667"/>
			<Parameter NAME="STRNx" VALUE="137.294"/>
			<Parameter NAME="STRNy" VALUE="9.58621"/>
			<Parameter NAME="STRNz" VALUE="178.559"/>
			<Parameter NAME="RFTShouldx" VALUE="84.4623"/>
			<Parameter NAME="RFTShouldy" VALUE="-56.6665"/>
			<Parameter NAME="RFTShouldz" VALUE="82.7699"/>
			<Parameter NAME="LFTShouldx" VALUE="87.8008"/>
			<Parameter NAME="LFTShouldy" VALUE="66.0344"/>
			<Parameter NAME="LFTShouldz" VALUE="80.1739"/>
			<Parameter NAME="LRRShouldx" VALUE="-120.895"/>
			<Parameter NAME="LRRShouldy" VALUE="95.5752"/>
			<Parameter NAME="LRRShouldz" VALUE="245.587"/>
			<Parameter NAME="RRRShouldx" VALUE="-128.793"/>
			<Parameter NAME="RRRShouldy" VALUE="-90.2575"/>
			<Parameter NAME="RRRShouldz" VALUE="249.816"/>
		</Parameters>
		<Skeleton>
			<Segment NAME="pelvis" POSITION="0 0 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-150 -140 0 50 140 150" RGB="35 131 226">
				<JointFree/>
				<Segment NAME="lfemur" POSITION="0 InterHip 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-50 -50 -480 50 50 0" RGB="0 179 0">
					<JointBall MEAN="0.147965 -0.203081 0.182459 " EDIT_POSE_MEAN="0 0 0 " T-POSE="0.174127 -0.128711 0.142789 " COVARIANCE="0.00289661 0.0142719 -0.00101172 0.0142719 0.0800519 -0.00544598 -0.00101172 -0.00544598 0.000698358 "/>
					<Segment NAME="ltibia" POSITION="0 0 -Thigh" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -440 40 40 0" RGB="0 179 0">
						<JointHinge AXIS="0 1 0" MEAN="0.360942 " EDIT_POSE_MEAN="0 " T-POSE="0.386238 " COVARIANCE="0.00270501 "/>
						<Segment NAME="lfoot" POSITION="0 0 -Shin" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -80 140 40 0" RGB="0 179 0">
							<JointHardySpicer AXIS-PAIR="0 1 0 0.707107 0 0.707107" MEAN="0.216177 -0.0787315 " EDIT_POSE_MEAN="0 0 " T-POSE="0.183545 -0.0831827 " COVARIANCE="0.00385083 -0.000849366 -0.000849366 0.00068612 "/>
							<Segment NAME="ltoes" POSITION="Foot 0 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="0 -40 -40 110 40 20" RGB="0 179 0">
								<JointHinge AXIS="0 1 0" MEAN="-0.562954 " EDIT_POSE_MEAN="0 " T-POSE="-0.56667 " COVARIANCE="0.00134349 "/>
							</Segment>
						</Segment>
					</Segment>
				</Segment>
				<Segment NAME="rfemur" POSITION="0 -InterHip 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-50 -50 -480 50 50 0" RGB="196 0 0">
					<JointBall MEAN="0.0836033 -0.171737 -0.235498 " EDIT_POSE_MEAN="0 0 0 " T-POSE="0.12031 -0.0994813 -0.18551 " COVARIANCE="0.000731676 -0.00333396 0.000442674 -0.00333396 0.087056 -0.00527091 0.000442674 -0.00527091 0.000958666 "/>
					<Segment NAME="rtibia" POSITION="0 0 -Thigh" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -440 40 40 0" RGB="196 0 0">
						<JointHinge AXIS="0 1 0" MEAN="0.355589 " EDIT_POSE_MEAN="0 " T-POSE="0.35295 " COVARIANCE="0.0028138 "/>
						<Segment NAME="rfoot" POSITION="0 0 -Shin" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -80 140 40 0" RGB="196 0 0">
							<JointHardySpicer AXIS-PAIR="0 1 0 0.707107 0 0.707107" MEAN="0.393119 -0.358752 " EDIT_POSE_MEAN="0 0 " T-POSE="0.378379 -0.366267 " COVARIANCE="0.00150789 0.000599384 0.000599384 0.000818595 "/>
							<Segment NAME="rtoes" POSITION="Foot 0 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="0 -40 -40 110 40 20" RGB="196 0 0">
								<JointHinge AXIS="0 1 0" MEAN="-0.798439 " EDIT_POSE_MEAN="0 " T-POSE="-0.784615 " COVARIANCE="0.00108612 "/>
							</Segment>
						</Segment>
					</Segment>
				</Segment>
				<Segment NAME="thorax" POSITION="-50 0 200" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-100 -120 0 100 120 300" RGB="68 217 254">
					<JointFree MEAN="-0.0193538 0.07928 -0.0658251 -11.4087 36.1357 -15.9499 " EDIT_POSE_MEAN="0 0 0 0 0 0 " T-POSE="-0.00405771 0.0625973 -0.0902678 -14.1731 39.8702 -15.8174 " COVARIANCE="0.0013155 0.000760882 -0.000383545 -0.0593774 0.104189 -0.0421277 0.000760882 0.0129149 0.00194072 0.133539 0.00407171 -0.526157 -0.000383545 0.00194072 0.000710101 0.0685485 -0.0593987 -0.07691 -0.0593774 0.133539 0.0685485 45.6081 -14.5633 -18.2794 0.104189 0.00407171 -0.0593987 -14.5633 25.299 2.35925 -0.0421277 -0.526157 -0.07691 -18.2794 2.35925 39.8549 "/>
					<Segment NAME="head" POSITION="0 0 400" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-30 -70 0 160 70 100" RGB="35 131 226">
						<JointFree MEAN="0.171433 -0.408017 -0.102351 -26.0335 1.50454 21.6818 " EDIT_POSE_MEAN="0 0 0 0 0 0 " T-POSE="0.170018 -0.338436 -0.0691369 -15.2114 -1.72387 25.0096 " COVARIANCE="0.0304311 0.00316677 -0.00257858 0.359776 -1.13724 0.143281 0.00316677 0.0961662 0.00435404 3.77822 -0.589402 2.46306 -0.00257858 0.00435404 0.00610701 0.246008 -0.00495571 0.0307472 0.359776 3.77822 0.246008 239.576 -25.1698 87.9919 -1.13724 -0.589402 -0.00495571 -25.1698 54.4535 -22.4195 0.143281 2.46306 0.0307472 87.9919 -22.4195 102.026 "/>
					</Segment>
					<Segment NAME="lclavicle" POSITION="0 0 ClavHeight" COVARIANCE="1 0 0 0 1 0 0 0 1" RGB="0 179 0">
						<JointHardySpicer AXIS-PAIR="1 0 0 0 0 1" MEAN="-0.33545 -0.0844966 " EDIT_POSE_MEAN="0 0 " T-POSE="-0.17462 -0.0533102 " COVARIANCE="0.0235324 0.0112515 0.0112515 0.0103677 "/>
						<Segment NAME="lhumerus" POSITION="0 Shoulder ShoulderHeight" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -320 40 40 40" RGB="0 179 0">
							<JointBall MEAN="0.806318 -0.148614 0.633391 " EDIT_POSE_MEAN="1.5708 0 0 " T-POSE="1.16242 -0.587658 1.09935 " COVARIANCE="0.110279 -0.100194 0.0877849 -0.100194 0.147804 -0.105795 0.0877849 -0.105795 0.116656 "/>
							<Segment NAME="lradius" POSITION="0 0 -UpperArm" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-35 -35 -300 35 35 0" RGB="0 179 0">
								<JointHardySpicer AXIS-PAIR="0 1 0 0 0 1" MEAN="-0.769486 -0.864031 " EDIT_POSE_MEAN="-0.436332 0 " T-POSE="-0.534959 -1.03948 " COVARIANCE="0.132274 -0.0512717 -0.0512717 0.0317223 "/>
								<Segment NAME="lhand" POSITION="0 0 -LowerArm" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-35 -35 -100 35 35 0" RGB="0 179 0">
									<JointHardySpicer AXIS-PAIR="-1 0 0 0 1 0" MEAN="-0.386023 0.171713 " EDIT_POSE_MEAN="0 0 " T-POSE="-0.489132 0.125134 " COVARIANCE="0.0125685 -7.39992e-005 -7.39992e-005 0.00587608 "/>
								</Segment>
							</Segment>
						</Segment>
					</Segment>
					<Segment NAME="rclavicle" POSITION="0 0 ClavHeight" COVARIANCE="1 0 0 0 1 0 0 0 1" RGB="196 0 0">
						<JointHardySpicer AXIS-PAIR="1 0 0 0 0 1" MEAN="0.413643 -0.00660033 " EDIT_POSE_MEAN="0 0 " T-POSE="0.252236 -0.0476278 " COVARIANCE="0.021946 0.0102111 0.0102111 0.0089677 "/>
						<Segment NAME="rhumerus" POSITION="0 -Shoulder ShoulderHeight" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-40 -40 -320 40 40 40" RGB="196 0 0">
							<JointBall MEAN="-0.802678 -0.214447 -0.514183 " EDIT_POSE_MEAN="-1.5708 0 0 " T-POSE="-1.20421 -0.699782 -0.949499 " COVARIANCE="0.137404 0.10107 0.100431 0.10107 0.122826 0.0952826 0.100431 0.0952826 0.119876 "/>
							<Segment NAME="rradius" POSITION="0 0 -UpperArm" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-35 -35 -300 35 35 0" RGB="196 0 0">
								<JointHardySpicer AXIS-PAIR="0 1 0 0 0 1" MEAN="-0.649534 0.580884 " EDIT_POSE_MEAN="-0.436332 0 " T-POSE="-0.527739 0.821558 " COVARIANCE="0.12652 0.0495199 0.0495199 0.0390227 "/>
								<Segment NAME="rhand" POSITION="0 0 -LowerArm" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-35 -35 -100 35 35 0" RGB="196 0 0">
									<JointHardySpicer AXIS-PAIR="-1 0 0 0 1 0" MEAN="0.475993 0.0591962 " EDIT_POSE_MEAN="0 0 " T-POSE="0.550954 0.0438135 " COVARIANCE="0.0126105 -0.00224964 -0.00224964 0.00349753 "/>
								</Segment>
							</Segment>
						</Segment>
					</Segment>
				</Segment>
			</Segment>
		</Skeleton>
		<MarkerSet NAME="Reatime Fullbody">
			<Markers>
				<Marker NAME="Root" SEGMENT="pelvis" RGB="249 255 0" POSITION="Rootx Rooty Rootz" COVARIANCE="3.77822 1.16753 -0.928979 1.16753 3.76264 1.05394 -0.928979 1.05394 7.57727" RADIUS="12.5"/>
				<Marker NAME="LFWT" SEGMENT="pelvis" RGB="255 0 6" POSITION="FWTx LFWTy LFWTz" COVARIANCE="2.15733 0.762155 6.15344 0.762155 8.29445 2.94359 6.15344 2.94359 33.0972" RADIUS="12.5"/>
				<Marker NAME="RFWT" SEGMENT="pelvis" RGB="26 255 0" POSITION="FWTx RFWTy RFWTz" COVARIANCE="1.89636 -1.09116 -2.69988 -1.09116 3.75406 -4.94911 -2.69988 -4.94911 52.7611" RADIUS="12.5"/>
				<Marker NAME="LBWT" SEGMENT="pelvis" RGB="177 1 5" POSITION="LBWTx LBWTy LBWTz" COVARIANCE="4.34927 1.81636 2.52796 1.81636 3.63173 2.84026 2.52796 2.84026 6.59692" RADIUS="12.5"/>
				<Marker NAME="RBWT" SEGMENT="pelvis" RGB="0 130 3" POSITION="RBWTx RBWTy RBWTz" COVARIANCE="1.42412 -0.410421 0.291334 -0.410421 3.8912 -0.169953 0.291334 -0.169953 20.608" RADIUS="12.5"/>
				<Marker NAME="LTHI" SEGMENT="lfemur" RGB="242 13 47" POSITION="LTHIx LTHIy LTHIz" COVARIANCE="2.68903 -1.5626 0.818687 -1.5626 8.53131 9.39198 0.818687 9.39198 20.4952" RADIUS="12.5"/>
				<Marker NAME="LKNE" SEGMENT="lfemur" RGB="203 52 56" POSITION="LKNEx LKNEy -Thigh" COVARIANCE="9.0739 3.47598 6.83402 3.47598 2.81041 2.13749 6.83402 2.13749 21.2542" RADIUS="12.5"/>
				<Marker NAME="LSHN" SEGMENT="ltibia" RGB="204 10 245" POSITION="LSHNx LSHNy LSHNz" COVARIANCE="3.0653 0.340487 2.72513 0.340487 1.52176 1.5142 2.72513 1.5142 11.0043" RADIUS="12.5"/>
				<Marker NAME="LANK" SEGMENT="ltibia" RGB="255 0 38" POSITION="LANKx 50 -Shin" COVARIANCE="2.89062 -0.810909 -6.35542 -0.810909 0.421846 2.05769 -6.35542 2.05769 21.6765" RADIUS="12.5"/>
				<Marker NAME="LHEE" SEGMENT="lfoot" RGB="255 0 249" POSITION="LHEEx LHEEy LHEEz" COVARIANCE="0.608874 -0.482621 -0.807624 -0.482621 0.561194 0.333522 -0.807624 0.333522 6.96683" RADIUS="12.5"/>
				<Marker NAME="LTOE" SEGMENT="ltoes" RGB="97 2 253" POSITION="LTOEx 0 0" COVARIANCE="1.3087 -0.205707 -0.432346 -0.205707 1.11191 -0.410863 -0.432346 -0.410863 1.70691" RADIUS="12.5"/>
				<Marker NAME="LMT5" SEGMENT="lfoot" RGB="151 53 132" POSITION="Foot LMT5y 0" COVARIANCE="0.775686 0.43233 -0.496413 0.43233 1.24771 -0.54581 -0.496413 -0.54581 2.32384" RADIUS="12.5"/>
				<Marker NAME="RTHI" SEGMENT="rfemur" RGB="27 228 41" POSITION="RTHIx RTHIy RTHIz" COVARIANCE="8.09062 15.6453 -0.67185 15.6453 73.5425 2.07173 -0.67185 2.07173 10.8813" RADIUS="12.5"/>
				<Marker NAME="RKNE" SEGMENT="rfemur" RGB="51 255 0" POSITION="RKNEx RKNEy -Thigh" COVARIANCE="10.0705 39.8845 14.3722 39.8845 235.188 70.8492 14.3722 70.8492 31.1069" RADIUS="12.5"/>
				<Marker NAME="RSHN" SEGMENT="rtibia" RGB="55 146 200" POSITION="RSHNx RSHNy RSHNz" COVARIANCE="17.6407 17.4548 -13.3074 17.4548 18.5409 -14.4923 -13.3074 -14.4923 18.2166" RADIUS="12.5"/>
				<Marker NAME="RANK" SEGMENT="rtibia" RGB="0 255 6" POSITION="RANKx -50 -Shin" COVARIANCE="109.848 16.0036 42.5026 16.0036 3.02312 7.09588 42.5026 7.09588 24.9956" RADIUS="12.5"/>
				<Marker NAME="RHEE" SEGMENT="rfoot" RGB="215 24 231" POSITION="RHEEx RHEEy RHEEz" COVARIANCE="40.8546 4.69156 -68.4079 4.69156 0.768775 -7.47997 -68.4079 -7.47997 121.681" RADIUS="12.5"/>
				<Marker NAME="RTOE" SEGMENT="rtoes" RGB="153 255 0" POSITION="RTOEx 0 0" COVARIANCE="62.2151 -27.4915 28.3177 -27.4915 14.7908 -11.912 28.3177 -11.912 13.758" RADIUS="12.5"/>
				<Marker NAME="RMT5" SEGMENT="rfoot" RGB="53 202 180" POSITION="Foot RMT5y 0" COVARIANCE="38.2919 48.743 -7.74585 48.743 63.6535 -9.21533 -7.74585 -9.21533 3.29492" RADIUS="12.5"/>
				<Marker NAME="TopSpine" SEGMENT="thorax" RGB="0 255 223" POSITION="TopSpinex TopSpiney TopSpinez" COVARIANCE="26.7541 -3.84467 -14.9713 -3.84467 13.5748 3.18085 -14.9713 3.18085 16.3102" RADIUS="12.5"/>
				<Marker NAME="MidBack" SEGMENT="thorax" RGB="185 0 255" POSITION="MidBackx MidBacky MidBackz" COVARIANCE="26.317 -0.138215 -3.04137 -0.138215 19.4648 -6.70892 -3.04137 -6.70892 14.177" RADIUS="12.5"/>
				<Marker NAME="LowerBack" SEGMENT="pelvis" RGB="0 0 255" POSITION="LowerBackx LowerBacky LowerBackz" COVARIANCE="29.5223 -15.1135 -3.37836 -15.1135 18.6927 4.70947 -3.37836 4.70947 23.9344" RADIUS="12.5"/>
				<Marker NAME="STRN" SEGMENT="thorax" RGB="112 74 181" POSITION="STRNx STRNy STRNz" COVARIANCE="6.28811 -5.32737 -5.42137 -5.32737 12.3961 14.6382 -5.42137 14.6382 34.5929" RADIUS="12.5"/>
				<Marker NAME="LFTShould" SEGMENT="lclavicle" RGB="204 0 255" POSITION="LFTShouldx LFTShouldy LFTShouldz" COVARIANCE="25.863 -5.80198 9.85375 -5.80198 33.8765 19.0317 9.85375 19.0317 28.654" RADIUS="12.5"/>
				<Marker NAME="RFTShould" SEGMENT="rclavicle" RGB="0 255 6" POSITION="RFTShouldx RFTShouldy RFTShouldz" COVARIANCE="25.6647 -3.64608 3.8498 -3.64608 38.8823 -15.1859 3.8498 -15.1859 14.8192" RADIUS="12.5"/>
				<Marker NAME="LRRShould" SEGMENT="thorax" RGB="45 0 255" POSITION="LRRShouldx LRRShouldy LRRShouldz" COVARIANCE="11.3767 11.0756 3.27734 11.0756 22.9219 4.03379 3.27734 4.03379 20.4543" RADIUS="12.5"/>
				<Marker NAME="RRRShould" SEGMENT="thorax" RGB="235 254 1" POSITION="RRRShouldx RRRShouldy RRRShouldz" COVARIANCE="11.7218 8.60741 0.697765 8.60741 36.201 -9.10761 0.697765 -9.10761 24.7996" RADIUS="12.5"/>
				<Marker NAME="LSHO" SEGMENT="lclavicle" RGB="29 4 251" POSITION="LSHOx LSHOy LSHOz" COVARIANCE="48.7635 9.87822 2.73252 9.87822 24.2867 -3.15635 2.73252 -3.15635 13.1577" RADIUS="12.5"/>
				<Marker NAME="LUPA" SEGMENT="lhumerus" RGB="134 69 186" POSITION="LUPAx LUPAy LUPAz" COVARIANCE="128.52 40.6837 21.5701 40.6837 51.0231 -34.9487 21.5701 -34.9487 66.5705" RADIUS="12.5"/>
				<Marker NAME="LELB" SEGMENT="lhumerus" RGB="223 200 32" POSITION="0 50 -UpperArm" COVARIANCE="70.8539 36.1427 24.3429 36.1427 47.1113 4.20569 24.3429 4.20569 95.0225" RADIUS="12.5"/>
				<Marker NAME="LFRM" SEGMENT="lradius" RGB="83 58 197" POSITION="LFRMx LFRMy LFRMz" COVARIANCE="12.4089 0.132861 -0.162994 0.132861 12.9585 8.82939 -0.162994 8.82939 15.3755" RADIUS="12.5"/>
				<Marker NAME="LWRA" SEGMENT="lradius" RGB="255 0 0" POSITION="LWRx 20 -LowerArm" COVARIANCE="43.6561 30.2294 3.65052 30.2294 33.5515 3.68257 3.65052 3.68257 23.0267" RADIUS="12.5"/>
				<Marker NAME="LWRB" SEGMENT="lradius" RGB="255 179 0" POSITION="-LWRx 20 -LowerArm" COVARIANCE="19.7149 3.89681 8.12799 3.89681 8.55208 -3.34899 8.12799 -3.34899 15.8622" RADIUS="12.5"/>
				<Marker NAME="LFIN" SEGMENT="lhand" RGB="236 0 255" POSITION="LFINx LFINy LFINz" COVARIANCE="2.02033 3.89554 0.492789 3.89554 16.3673 -0.701068 0.492789 -0.701068 2.06939" RADIUS="12.5"/>
				<Marker NAME="RSHO" SEGMENT="rclavicle" RGB="152 248 7" POSITION="RSHOx RSHOy RSHOz" COVARIANCE="36.036 -23.4075 -17.6699 -23.4075 29.7042 28.1784 -17.6699 28.1784 37.7151" RADIUS="12.5"/>
				<Marker NAME="RUPA" SEGMENT="rhumerus" RGB="150 202 53" POSITION="RUPAx RUPAy RUPAz" COVARIANCE="44.7445 -16.5022 18.2137 -16.5022 29.182 8.69466 18.2137 8.69466 25.8054" RADIUS="12.5"/>
				<Marker NAME="RELB" SEGMENT="rhumerus" RGB="73 182 128" POSITION="0 -50 -UpperArm" COVARIANCE="99.7845 30.0766 62.253 30.0766 46.4387 9.66612 62.253 9.66612 68.5855" RADIUS="12.5"/>
				<Marker NAME="RFRM" SEGMENT="rradius" RGB="188 67 188" POSITION="RFRMx RFRMy RFRMz" COVARIANCE="4.93739 0.053706 0.210946 0.053706 10.6162 -5.34415 0.210946 -5.34415 16.2582" RADIUS="12.5"/>
				<Marker NAME="RWRA" SEGMENT="rradius" RGB="0 255 13" POSITION="RWRx -20 -LowerArm" COVARIANCE="11.95 5.4305 15.8305 5.4305 16.1237 6.66366 15.8305 6.66366 50.0549" RADIUS="12.5"/>
				<Marker NAME="RWRB" SEGMENT="rradius" RGB="122 92 163" POSITION="-RWRx -20 -LowerArm" COVARIANCE="18.5048 6.98067 21.0653 6.98067 15.4638 20.0177 21.0653 20.0177 60.3679" RADIUS="12.5"/>
				<Marker NAME="RFIN" SEGMENT="rhand" RGB="242 255 0" POSITION="RFINx RFINy RFINz" COVARIANCE="0.956545 -1.13805 0.526952 -1.13805 14.3784 0.858955 0.526952 0.858955 2.06712" RADIUS="12.5"/>
				<Marker NAME="LFHD" SEGMENT="head" RGB="255 0 0" POSITION="LFHDx LFHDy LFHDz" COVARIANCE="0.848049 -0.160445 0.103975 -0.160445 0.363958 0.0756993 0.103975 0.0756993 1.1558" RADIUS="12.5"/>
				<Marker NAME="RFHD" SEGMENT="head" RGB="6 255 0" POSITION="RFHDx RFHDy RFHDz" COVARIANCE="0.705775 -0.178106 -0.829915 -0.178106 0.499628 0.285152 -0.829915 0.285152 1.57426" RADIUS="12.5"/>
				<Marker NAME="LBHD" SEGMENT="head" RGB="119 0 0" POSITION="LBHDx LBHDy LBHDz" COVARIANCE="4.12457 -0.763652 4.75328 -0.763652 1.46728 -0.606566 4.75328 -0.606566 12.035" RADIUS="12.5"/>
				<Marker NAME="RBHD" SEGMENT="head" RGB="1 150 9" POSITION="RBHDx RBHDy RBHDz" COVARIANCE="4.23985 -0.880901 4.03095 -0.880901 0.64509 -1.11883 4.03095 -1.11883 6.66491" RADIUS="12.5"/>
			</Markers>
			<Sticks>
				<Stick MARKER1="LFHD" MARKER2="LBHD" RGB="255 0 0"/>
				<Stick MARKER1="RFHD" MARKER2="RBHD" RGB="0 255 0"/>
				<Stick MARKER1="LFHD" MARKER2="RFHD" RGB="68 217 254"/>
				<Stick MARKER1="LBHD" MARKER2="RBHD" RGB="68 217 254"/>
				<Stick MARKER1="LFHD" MARKER2="RBHD" RGB="68 217 254"/>
				<Stick MARKER1="LBHD" MARKER2="RFHD" RGB="68 217 254"/>
				<Stick MARKER1="TopSpine" MARKER2="MidBack" RGB="68 217 254"/>
				<Stick MARKER1="TopSpine" MARKER2="LSHO" RGB="255 0 0"/>
				<Stick MARKER1="LSHO" MARKER2="LUPA" RGB="255 0 0"/>
				<Stick MARKER1="LSHO" MARKER2="LELB" RGB="255 0 0"/>
				<Stick MARKER1="LUPA" MARKER2="LELB" RGB="255 0 0"/>
				<Stick MARKER1="LELB" MARKER2="LFRM" RGB="255 0 0"/>
				<Stick MARKER1="LELB" MARKER2="LWRA" RGB="255 0 0"/>
				<Stick MARKER1="LELB" MARKER2="LWRB" RGB="145 0 0"/>
				<Stick MARKER1="LFRM" MARKER2="LWRA" RGB="255 0 0"/>
				<Stick MARKER1="LFRM" MARKER2="LWRB" RGB="149 0 0"/>
				<Stick MARKER1="LWRA" MARKER2="LWRB" RGB="255 0 0"/>
				<Stick MARKER1="LWRA" MARKER2="LFIN" RGB="255 0 0"/>
				<Stick MARKER1="LWRB" MARKER2="LFIN" RGB="149 0 0"/>
				<Stick MARKER1="TopSpine" MARKER2="RSHO" RGB="0 255 0"/>
				<Stick MARKER1="RSHO" MARKER2="RUPA" RGB="0 255 0"/>
				<Stick MARKER1="RSHO" MARKER2="RELB" RGB="0 255 0"/>
				<Stick MARKER1="RUPA" MARKER2="RELB" RGB="0 255 0"/>
				<Stick MARKER1="RELB" MARKER2="RFRM" RGB="0 145 0"/>
				<Stick MARKER1="RELB" MARKER2="RWRA" RGB="0 255 0"/>
				<Stick MARKER1="RELB" MARKER2="RWRB" RGB="0 151 0"/>
				<Stick MARKER1="RFRM" MARKER2="RWRA" RGB="0 255 0"/>
				<Stick MARKER1="RFRM" MARKER2="RWRB" RGB="0 145 0"/>
				<Stick MARKER1="RWRA" MARKER2="RWRB" RGB="0 255 0"/>
				<Stick MARKER1="RWRA" MARKER2="RFIN" RGB="0 255 0"/>
				<Stick MARKER1="RWRB" MARKER2="RFIN" RGB="0 145 0"/>
				<Stick MARKER1="LFWT" MARKER2="LBWT" RGB="255 0 0"/>
				<Stick MARKER1="RFWT" MARKER2="RBWT" RGB="0 255 0"/>
				<Stick MARKER1="LFWT" MARKER2="RFWT" RGB="68 217 254"/>
				<Stick MARKER1="LBWT" MARKER2="RBWT" RGB="68 217 254"/>
				<Stick MARKER1="LFWT" MARKER2="RBWT" RGB="68 217 254"/>
				<Stick MARKER1="LBWT" MARKER2="RFWT" RGB="68 217 254"/>
				<Stick MARKER1="LFWT" MARKER2="LTHI" RGB="255 0 0"/>
				<Stick MARKER1="LFWT" MARKER2="LKNE" RGB="255 0 0"/>
				<Stick MARKER1="LBWT" MARKER2="LKNE" RGB="255 0 0"/>
				<Stick MARKER1="LTHI" MARKER2="LKNE" RGB="255 0 0"/>
				<Stick MARKER1="LKNE" MARKER2="LANK" RGB="255 0 0"/>
				<Stick MARKER1="LKNE" MARKER2="LSHN" RGB="255 0 0"/>
				<Stick MARKER1="LSHN" MARKER2="LANK" RGB="255 0 0"/>
				<Stick MARKER1="LANK" MARKER2="LMT5" RGB="255 0 0"/>
				<Stick MARKER1="LANK" MARKER2="LTOE" RGB="255 0 0"/>
				<Stick MARKER1="LANK" MARKER2="LHEE" RGB="255 0 0"/>
				<Stick MARKER1="LHEE" MARKER2="LMT5" RGB="255 0 0"/>
				<Stick MARKER1="LHEE" MARKER2="LTOE" RGB="255 0 0"/>
				<Stick MARKER1="LMT5" MARKER2="LTOE" RGB="255 0 0"/>
				<Stick MARKER1="RFWT" MARKER2="RTHI" RGB="0 255 0"/>
				<Stick MARKER1="RFWT" MARKER2="RKNE" RGB="0 255 0"/>
				<Stick MARKER1="RBWT" MARKER2="RKNE" RGB="0 255 0"/>
				<Stick MARKER1="RTHI" MARKER2="RKNE" RGB="0 255 0"/>
				<Stick MARKER1="RKNE" MARKER2="RANK" RGB="0 255 0"/>
				<Stick MARKER1="RKNE" MARKER2="RSHN" RGB="0 255 0"/>
				<Stick MARKER1="RSHN" MARKER2="RANK" RGB="0 255 0"/>
				<Stick MARKER1="RANK" MARKER2="RMT5" RGB="0 255 0"/>
				<Stick MARKER1="RANK" MARKER2="RTOE" RGB="0 255 0"/>
				<Stick MARKER1="RANK" MARKER2="RHEE" RGB="0 255 0"/>
				<Stick MARKER1="RHEE" MARKER2="RMT5" RGB="0 255 0"/>
				<Stick MARKER1="RHEE" MARKER2="RTOE" RGB="0 255 0"/>
				<Stick MARKER1="RMT5" MARKER2="RTOE" RGB="0 255 0"/>
				<Stick MARKER1="RFTShould" MARKER2="RSHO" RGB="0 255 0"/>
				<Stick MARKER1="RSHO" MARKER2="RRRShould" RGB="0 255 0"/>
				<Stick MARKER1="RRRShould" MARKER2="TopSpine" RGB="0 255 0"/>
				<Stick MARKER1="RFTShould" MARKER2="STRN" RGB="0 255 0"/>
				<Stick MARKER1="RBWT" MARKER2="Root" RGB="0 255 0"/>
				<Stick MARKER1="LRRShould" MARKER2="LRRShould" RGB="255 0 6"/>
				<Stick MARKER1="LRRShould" MARKER2="TopSpine" RGB="255 0 6"/>
				<Stick MARKER1="LRRShould" MARKER2="LSHO" RGB="255 0 6"/>
				<Stick MARKER1="LSHO" MARKER2="LFTShould" RGB="255 0 6"/>
				<Stick MARKER1="LFTShould" MARKER2="STRN" RGB="255 0 6"/>
				<Stick MARKER1="LRRShould" MARKER2="LFTShould" RGB="68 217 254"/>
				<Stick MARKER1="RRRShould" MARKER2="RFTShould" RGB="68 217 254"/>
				<Stick MARKER1="LFTShould" MARKER2="RFTShould" RGB="68 217 254"/>
				<Stick MARKER1="MidBack" MARKER2="LowerBack" RGB="68 217 254"/>
				<Stick MARKER1="LowerBack" MARKER2="Root" RGB="68 217 254"/>
				<Stick MARKER1="LBWT" MARKER2="Root" RGB="255 0 0"/>
				<Stick MARKER1="MidBack" MARKER2="LRRShould" RGB="255 0 0"/>
				<Stick MARKER1="MidBack" MARKER2="RRRShould" RGB="51 255 0"/>
			</Sticks>
		</MarkerSet>
	</KinematicModel>



I Assume this makes things a hell of alot easier now that they can both be loaded as xdocuments?

This post has been edited by SPACEMTNMAN: 27 March 2012 - 04:38 PM

Was This Post Helpful? 0
  • +
  • -

#23 SPACEMTNMAN  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 25-June 09

Re: Merging XML Nodes into another document

Posted 27 March 2012 - 05:24 PM

View PostSPACEMTNMAN, on 27 March 2012 - 05:25 PM, said:

That...That is a good question. its a sample file in the documentation and i havent tried that. Im in the studio tomorrow so ill test that out ASAP!

EDIT: Just looked at some other vsk files and it seems the documentation has a partial vsk file instead of a full one. this is what a full file should look like.


snip




I Assume this makes things a hell of alot easier now that they can both be loaded as xdocuments?



As is always the case the snippet you provided me with in the first place now somewhat does the job however i want to add the data from the nodes of the first document onto the end of the same nodes in the second document rather than replace them. i have tried addafterself but it still replaces them for some reason.

Dim segs = x2.<KinematicModel>.<Skeleton>.<Segment>
        Dim markers = x2.<KinematicModel>.<MarkerSet>.<Markers>.<Marker>
        x2.<KinematicModel>.<MarkerSet>.First.ReplaceAll(markers)
        rtbtemp.Text = x2.ToString



this is what i currently have. am i making a mistake setting the rtbtemp.text to x2?. This code changes the new complete xml i posted to this

<KinematicModel>
  <Parameters />
  <Skeleton>
    <Segment NAME="Bat" POSITION="0 0 0" COVARIANCE="1 0 0 0 1 0 0 0 1" BOUNDS="-57.4309 -52.5871 -13.9333 37.5105 750.982 13.0406" RGB="0 147 0">
      <JointFree />
    </Segment>
  </Skeleton>
  <MarkerSet>
    <Marker NAME="Marker1" SEGMENT="Bat" POSITION="18.117 186.694 -8.67689" COVARIANCE="1 0 0 0 1 0 0 0 1" RADIUS="12.5" />
    <Marker NAME="Marker2" SEGMENT="Bat" POSITION="56.4299 612.707 13.9333" COVARIANCE="1 0 0 0 1 0 0 0 1" RADIUS="12.5" />
    <Marker NAME="Marker3" SEGMENT="Bat" POSITION="43.8768 290.93 -10.9203" COVARIANCE="1 0 0 0 1 0 0 0 1" RADIUS="12.5" />
  </MarkerSet>
</KinematicModel>



This is great. I Just need to retain the Segments and Markers that were originally there and just add these segments and markers to the end of the node.


EDIT: I changed the x2 to x1 and i get a different output that seems to chop off the sticks and the parameters at the beginning of the file. Im very confused with all this right now haha.

This post has been edited by SPACEMTNMAN: 27 March 2012 - 05:34 PM

Was This Post Helpful? 0
  • +
  • -

#24 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 1959
  • View blog
  • Posts: 8,700
  • Joined: 29-May 08

Re: Merging XML Nodes into another document

Posted 28 March 2012 - 12:37 PM

Maybe do some research through the MSDN Documentation on the subject, will be beneficial.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2