How to go from string to dataset?
From MQ I get an xml document as datatype string that looks something like following
<root>
<child1>
<child2>
<name>DOnald></name>
<age>14</age>
<mail>[email protected]</mail>
</child2>
<child2>
<name>Goofy></name>
<age>66</age>
<mail>[email protected]</mail>
</child2>
</child1>
</root>
Now suppose I want to bind this string to a dataset, I want datasource (the table) to correspond to the child1 node, and the child2 nodes to be the rows of the datasource, and the name, age, mail to be the columns.
How should I do this? Im quite clueless at the moment....
/henrik
Re: How to go from string to dataset?
Take a look at this link
http://www.codeguru.com/vb/gen/vb_da...cle.php/c5153/
Theres a section "ADO.NET Model Exploitation with XML" that might give you a little direction...
Re: How to go from string to dataset?
Hmm yes This i already know.. I believe my concern was with how to convert that string to a proper xml document.
Does the dataset HAVE TO read from xml file?? What If I already have an xmldocument object??? It seems very cumbersome if I already have it in memory to store it to file and then read it back into memory? Could a memorysteam work?
kind regards
Henrik