I have been looking for an answer for this for a while: I have an XML file that is formatted like so:
<root>
<string id = "STRING_ID">
<node1> Some data </node1>
<node2>
<type>data</type>
</node2>
<Translations>
<language name="ARABIC">
<value>Some data</value>
<date_last_changed>7-4-2011</date_last_changed>
</language>
<language name="CHINESE">
...
...
</Translations>
</string>
<string id = "...">
...
...
</root>
I loaded a DataSet with information from an XML file. I then bound the DataSet to a DataGridView via
DataGridView1.DataSource = dataSet1;
and then used
DataGridView1.DataMember = "string";
Currently the datagridview displays the content in node 1, and the value of the id attribute of each string element.
My question is: How do I populate a column with the data contained in all of the <value>
elements of <language>
in each <string>
whose language name = "ENGLISH"
or "ARABIC"
and so on? Sounds like a query to me, but I'm not sure how to do this.
Basically I want one column to always display every english string corresponding to the appropriate string ID in my datagridview, and then one more column to display every string of a language that I select using a list in a ComboBox.