EDN Admin
Well-known member
Hello,
I am very new to xml and I am trying to read the numbers enclosed by the <mn:group> tags in an xml file using VB.Net. Here is a section of the file:
<span> <span><?<span>xml version="1.0" encoding="ISO-8859-1"
<span>?>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>statePath<span> xmlns:xsi<span>=" http://www.w3.org/2001/XMLSchema-instance <span>"<span> xsi:schemaLocation<span>=" http://www.energid.com/namespace/ct testpath.ct.xsd <span>"<span>
xmlns<span>=" http://www.energid.com/namespace/ct <span>"<span> version<span>=" 3.0.0 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>stateVector<span> size<span>=" 268 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# +
<span><<span>element<span>>
<div style="
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mnositionStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:coordinateSystemTransform<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>crrientation
<span>q0<span>=" 1 <span>"<span> q1<span>=" 0 <span>"<span> q2<span>=" 0 <span>"<span> q3<span>=" 0 <span>"<span>
/>
<div style="text-indent:-2em <span> <span><<span>cr:translation
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:coordinateSystemTransform<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointPositions<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>-1.3947279233236227 -0.023032206213709827 0.19193503705187043 0.06397834702296068 -0.54509549751464981 -0.012795666994385169 0.12539755421982557 9.4260656929729631e-005
9.4260656929729631e-005<span></<span>mn:group<span>>
<span> <span></<span>mn:jointPositions<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mnositionStates<span>>
<div style="text-indent:-2em <span> <span><<span>mn:time<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span>><span>0.031<span></<span>mn:time<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:velocityStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:generalVelocity<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>cr:angular
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<div style="text-indent:-2em <span> <span><<span>cr:linear
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:generalVelocity<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointVelocities<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>0 0 0 0 0 0.046495571959999996 0 0 0<span></<span>mn:group<span>>
<span> <span></<span>mn:jointVelocities<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mn:velocityStates<span>>
<span> <span></<span>element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mnositionStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:coordinateSystemTransform<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>crrientation
<span>q0<span>=" 1 <span>"<span> q1<span>=" 0 <span>"<span> q2<span>=" 0 <span>"<span> q3<span>=" 0 <span>"<span>
/>
<div style="text-indent:-2em <span> <span><<span>cr:translation
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:coordinateSystemTransform<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointPositions<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>-1.3947279233236227 -0.028150473814866128 0.19705330465302717 0.0076774034102404798 -0.51950415950886786 -0.28406384985567401 0.40690227228342701
0.00020737346300045203 0.00020737346300045203<span></<span>mn:group<span>>
<span> <span></<span>mn:jointPositions<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mnositionStates<span>>
<div style="text-indent:-2em <span> <span><<span>mn:time<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span>><span>0.156<span></<span>mn:time<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:velocityStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:generalVelocity<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>cr:angular
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<div style="text-indent:-2em <span> <span><<span>cr:linear
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:generalVelocity<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointVelocities<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>0 0 0 0 0 0.046495571959999996 0 0 0<span></<span>mn:group<span>>
<span> <span></<span>mn:jointVelocities<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mn:velocityStates<span>>
<span> <span></<span>element<span>>
<span>
My understanding is that the colon in <mn:group> means that group is an attribute but all my attempts to read those numbers have failed using the example code that I have found on the net. Any suggestions would be helpful and appreciated.
Thanks.
Dihcar
View the full article
I am very new to xml and I am trying to read the numbers enclosed by the <mn:group> tags in an xml file using VB.Net. Here is a section of the file:
<span> <span><?<span>xml version="1.0" encoding="ISO-8859-1"
<span>?>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>statePath<span> xmlns:xsi<span>=" http://www.w3.org/2001/XMLSchema-instance <span>"<span> xsi:schemaLocation<span>=" http://www.energid.com/namespace/ct testpath.ct.xsd <span>"<span>
xmlns<span>=" http://www.energid.com/namespace/ct <span>"<span> version<span>=" 3.0.0 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>stateVector<span> size<span>=" 268 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# +
<span><<span>element<span>>
<div style="
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mnositionStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:coordinateSystemTransform<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>crrientation
<span>q0<span>=" 1 <span>"<span> q1<span>=" 0 <span>"<span> q2<span>=" 0 <span>"<span> q3<span>=" 0 <span>"<span>
/>
<div style="text-indent:-2em <span> <span><<span>cr:translation
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:coordinateSystemTransform<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointPositions<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>-1.3947279233236227 -0.023032206213709827 0.19193503705187043 0.06397834702296068 -0.54509549751464981 -0.012795666994385169 0.12539755421982557 9.4260656929729631e-005
9.4260656929729631e-005<span></<span>mn:group<span>>
<span> <span></<span>mn:jointPositions<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mnositionStates<span>>
<div style="text-indent:-2em <span> <span><<span>mn:time<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span>><span>0.031<span></<span>mn:time<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:velocityStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:generalVelocity<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>cr:angular
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<div style="text-indent:-2em <span> <span><<span>cr:linear
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:generalVelocity<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointVelocities<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>0 0 0 0 0 0.046495571959999996 0 0 0<span></<span>mn:group<span>>
<span> <span></<span>mn:jointVelocities<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mn:velocityStates<span>>
<span> <span></<span>element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mnositionStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:coordinateSystemTransform<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>crrientation
<span>q0<span>=" 1 <span>"<span> q1<span>=" 0 <span>"<span> q2<span>=" 0 <span>"<span> q3<span>=" 0 <span>"<span>
/>
<div style="text-indent:-2em <span> <span><<span>cr:translation
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:coordinateSystemTransform<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointPositions<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>-1.3947279233236227 -0.028150473814866128 0.19705330465302717 0.0076774034102404798 -0.51950415950886786 -0.28406384985567401 0.40690227228342701
0.00020737346300045203 0.00020737346300045203<span></<span>mn:group<span>>
<span> <span></<span>mn:jointPositions<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mnositionStates<span>>
<div style="text-indent:-2em <span> <span><<span>mn:time<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span>><span>0.156<span></<span>mn:time<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:velocityStates<span> xmlns:mn<span>=" http://www.energid.com/namespace/mn <span>"<span> size<span>=" 1 <span>"<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:element<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>cr:generalVelocity<span> xmlns:cr<span>=" http://www.energid.com/namespace/cr <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>cr:angular
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<div style="text-indent:-2em <span> <span><<span>cr:linear
<span>x<span>=" 0 <span>"<span> y<span>=" 0 <span>"<span> z<span>=" 0 <span>"<span> />
<span> <span></<span>cr:generalVelocity<span>>
<div style="text-indent:-2em file:///C:/Documents%20and%20Settings/rmanseur/Desktop/testpath.xml# -
<span><<span>mn:jointVelocities<span> size<span>=" 9 <span>"<span>>
<div style="text-indent:-2em <span> <span><<span>mn:group<span>><span>0 0 0 0 0 0.046495571959999996 0 0 0<span></<span>mn:group<span>>
<span> <span></<span>mn:jointVelocities<span>>
<span> <span></<span>mn:element<span>>
<span> <span></<span>mn:velocityStates<span>>
<span> <span></<span>element<span>>
<span>
My understanding is that the colon in <mn:group> means that group is an attribute but all my attempts to read those numbers have failed using the example code that I have found on the net. Any suggestions would be helpful and appreciated.
Thanks.
Dihcar
View the full article