XML So Close I Can Taste It

P

Peter

Hi again,

I have created an XML file and loaded it into a dataset using the ReadXML
method. Now, just as it would seem the data access were at my fingertips, I
run into this problem:

My XML file has the simplified structure:
<doc>
<table name="table1">
<row data="data1" />
<row data="data2" />
<row data="data3" />
</table>
<table name="table2">
<row data="data4" />
<row data="data5" />
<row data="data6" />
</table>
</doc>

Now my dataset's Tables collection contains Tables("table") with rows
"table1" and "table2". It also contains Tables("row") with rows "data1"
through "data6". What I really need to do (and why this isn't standard
behaviour, I can't imagine) is to be able to do something like
DataSet.Tables("table").Rows("table1").Rows, in order to pull just the rows
"data1" through "data3". In other words, how do you traverse nested tables
codewise as the XML Designer's data view shows graphically?
 
C

Cor Ligthert [MVP]

Peter,

Don't ask twice I would have given you the same answer on both questions.

See my answer in your other message,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top