Navigate a DataSet/DataTable



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


.



Relevant Pages

  • Finding/removing nodes with attribute value
    ... I have a rather large xml document that can have one or ... can someone help me get the XPath at that point? ... Or can someone suggest another appoach to navigate the xml and find ...
    (microsoft.public.dotnet.xml)
  • Re: AoC: My 2 pennies
    ... *points fingers* keyboard turner keyboard turner. ... but every one of them still uses the keyboard to navigate. ... I bind auto run to the inside thumb mouse button and steer with the mouse. ...
    (comp.sys.ibm.pc.games.rpg)
  • Re: AoC: My 2 pennies
    ... *points fingers* keyboard turner keyboard turner. ... but every one of them still uses the keyboard to navigate. ... I bind auto run to the inside thumb mouse button and steer with the mouse. ...
    (comp.sys.ibm.pc.games.rpg)