Results 1 to 3 of 3

Thread: How to go from string to dataset?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    Exclamation 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

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    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...

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width