PDA

View Full Version : xml grid - problem with child node.



mbjorge
12 Feb 2010, 4:01 PM
I have an xml file with same child node names. I want to be able to select the child nodes to display in the grid. I am a bit confused about how to select the child "Data" child nodes. Can anyone point me in the right direction please.

This is my xml:


<Message>
<Document>
<item>
<Place>Lis</place>
<Data>
<Time>07-FEB-2010 03:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>07-FEB-2010 09:52</Time>
<Value>61</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>07-FEB-2010 16:52</Time>
<Value>21</Value>
<Code>LV</Code>
</Data>
<Data>
<Time>09-FEB-2010 03:52</Time>
<Value>51</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>09-FEB-2010 09:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>09-FEB-2010 16:52</Time>
<Value>106</Value>
<Code>HV</Code>
</Data>
</item>
<item>
<Place>Kar</place>
<Data>
<Time>07-FEB-2010 03:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>07-FEB-2010 09:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>07-FEB-2010 16:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>09-FEB-2010 03:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>09-FEB-2010 09:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
<Data>
<Time>09-FEB-2010 16:52</Time>
<Value>81</Value>
<Code>HV</Code>
</Data>
</item>
</Document>
</Message>


I want my Grid to look like this table:


<table>
<tr>
<td>Place</td>
<td>Date</td>
<td>Date</td>
</tr>
<tr>
<td>Lis</td>
<td>07-FEB-2010 03:52<br />
81, HV<br />
07-FEB-2010 09:52<br />
61, HV<br />
07-FEB-2010 16:52<br />
21, LV<br />
</td>
<td>09-FEB-2010 03:52<br />
51, HV<br />
09-FEB-2010 09:52<br />
81, HV<br />
09-FEB-2010 16:52<br />
106, HV<br />
</td>
</tr>
</table>