I have a whole heap of invoices, each contains a Lines element, which itself contains multiple Line elements.
I need to display this in a table, laid out so that each line is in a column, and that they are all laid out in the same columns, eg:
UserName LocalCalls MobileCalls InternatCalls .....
The Titles come from the ProductName in each Line.
<invoice>
<UserName></UserName>
<Lines>
<Line>
<ProductID>2</ProductID>
<ProductName>International Call</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
<Line>
<ProductID>224</ProductID>
<ProductName>Local Call</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
<Line>
<ProductID>225</ProductID>
<ProductName>Mobile Call</ProductName>
<Qty>1.00</Qty>
<Amount>0.90</Amount>
</Line>
<Line>
<ProductID>226</ProductID>
<ProductName>National Call</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
<Line>
<ProductID>228</ProductID>
<ProductName>Other Call</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
<Line>
<ProductID>230</ProductID>
<ProductName>Phone VAS</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
<Line>
<ProductID>229</ProductID>
<ProductName>Local Call Credit</ProductName>
<Qty>0.00</Qty>
<Amount>0.00</Amount>
</Line>
</Lines>
</invoice>