I have an xml file, for example:
<result> <customer> <id>1</id> <name>A</name> </customer> <customer> <id>2</id> <name>B</name> </customer> </result>
So, I need this data populated on a DataSet, here is my code:
var reader = new StringReader(xmldoc.InnerXml); dsDatos.ReadXml(reader);
The problem is that it populates the dataset with two tables, each of which has one row. But I need one table with two rows.
What am I doing wrong?
PD: I use C # and I do not want to iterate through the XML file, I want to use the ReadXml method.
Thank you for your time.
source share