C
Carl Lindmark
Hello,
I am having trouble understanding how to navigate a DataSet table... - maybe
someone can steer me in the right direction?
Say you've read an XML document into a DataSet ("myDataSet") and then filled
a DataTable by doing: myDataSet.Tables["situation"];
and the XML looks this way:
....
<situation>
<objectID>123</objectId>
<validityPeriod>
<start>2004-10-16T06:00:00+02:00</start>
<end>2004-10-18T15:00:00+02:00</end>
</validityPeriod>
....
</situation>
....
Now, the DataTable is filled nicely and I can access the "objectId" value
easily, but I just don't understand how I can go from "situation" to
"validityPeriod" and then on to "start" and "end".
I THINK I managed to get to the "start" and "end" values directly, by using
"GetChildRows" somehow - but the way I did that, I couldn't make sure that
the "start" and "end" I found were actually children of "validityPeriod",
which I have to be sure of.
Could anyone help me navigate this DataTable?
Thanks in advance!
Sincerely,
Carl Lindmark
I am having trouble understanding how to navigate a DataSet table... - maybe
someone can steer me in the right direction?
Say you've read an XML document into a DataSet ("myDataSet") and then filled
a DataTable by doing: myDataSet.Tables["situation"];
and the XML looks this way:
....
<situation>
<objectID>123</objectId>
<validityPeriod>
<start>2004-10-16T06:00:00+02:00</start>
<end>2004-10-18T15:00:00+02:00</end>
</validityPeriod>
....
</situation>
....
Now, the DataTable is filled nicely and I can access the "objectId" value
easily, but I just don't understand how I can go from "situation" to
"validityPeriod" and then on to "start" and "end".
I THINK I managed to get to the "start" and "end" values directly, by using
"GetChildRows" somehow - but the way I did that, I couldn't make sure that
the "start" and "end" I found were actually children of "validityPeriod",
which I have to be sure of.
Could anyone help me navigate this DataTable?
Thanks in advance!
Sincerely,
Carl Lindmark