Hi,
I used xsd.exe to generate a *.xsd file from the *.xml-File and then I
created a typed DataSet in VisualStudio 2003
But now I have problems to read the data from the DataSet.
<?xml version="1.0" encoding="UTF-8"?>
<Message id="100199" version="1.9" something="1">
<Jobs id="999" priority="0">
<DataContainer generationDate="19042005102504" RecordCount="1">
<CardRecord number="123456" number_id="00000099" crnSeq="1"
Perso="1000000000000123456">
<Module mic="modul_1">
<Data name="name" format="TEXT">Mustermann</Data>
</Module>
<Module mic="modul_2">
<Data name="boss" format="TEXT">Maier</Data>
</Module>
<Module mic="modul_3">
<Data name="chef" format="TEXT">Hauser</Data>
</Module>
</CardRecord>
</DataContainer>
</Jobs>
</Message>
I like to read the values from "Data". I am able to show all of these
data with the following code:
foreach (DataRow custRow in newDataSet1.Tables["Data"].Rows)
{
this.listBox1.Items.Add(custRow.ItemArray[2]);
}
But I need to read single data. I want only show the part of the
Data-table that belongs to "modul_1" or "modul_2".
Is my idea with "ItemArray" good? I believe that there is a better way
to retrieve the data but I was not able to find it.
Thanks for all tips.
Gruß
Thomas