Would anyone have any example code in VB that illustrates how I can merge the tables that are generated when XML is read into a dataset.
An example of the XML would be:
<process>
<block1>
<name>name1</name>
<dated>01/04/2009</dated>
</block1>
<block2>
<text>A</text>
<UID>1</UID>
<title>
<label>label1</label>
<value>value1</value>
</title>
<description>
<label>label2</label>
<value>value2</value>
</description>
<test />
</block2>
<block2>
<text>B</text>
<UID>2</UID>
<title>
<label>label3</label>
<value>value3</value>
</title>
<description>
<label>label4</label>
<value>value4</value>
</description>
<test>test1</test>
</block2>
</process>
I want to end up with a table with the following columns:
block1_name; block1_dated; block2_text; block2_UID; block2_title_label; block2_title_value; block2_description_label; block2_description_value; block2_test
And the data to read:
name1 , 01/04/2009 , A , 1 , label1 , value1 , label2, value2 , NULL;
name1 , 01/04/2009 , B , 2 , label3 , value3 , label3, value3 , test1;
I've tried using the .merge method on the tables but to no avail.
Any pointers would be most welcome.
Many thanks in anticipation.