Home All Groups Group Topic Archive Search About

How can I read an XML string directly into a dataset without creating a file?

Author
8 Feb 2006 5:11 AM
Don
Howdy Folks,

Below is an example of a string I've created in memory. I would like
to load it directly into a dataset that can then be displayed in a
DataGrid or . . . whatever. Can I load the string into the dataset
without first saving it to a file?

This doesn't work but, you probably know that <g>

Dim dsStatement As New DataSet("STMTTRN")
dsStatement.ReadXml(strOFXXML)


Thank you,

    Don


EXAMPLE of strOFXXML:

-<OFX>
- <STMTTRN>
  <TRNTYPE>DEBIT</TRNTYPE>
  <DTPOSTED>20050912120000</DTPOSTED>
  <TRNAMT>-1.61</TRNAMT>
  <FITID>2005091213</FITID>
  <NAME>POS PURCHASE - SAFEWAY STORE SAF</NAME>
  </STMTTRN>
- <STMTTRN>
  <TRNTYPE>DEBIT</TRNTYPE>
  <DTPOSTED>20050912120000</DTPOSTED>
  <TRNAMT>-3.00</TRNAMT>
  <FITID>2005091212</FITID>
  <NAME>POS PURCHASE - FRED MEYER </NAME>
  </STMTTRN>
- <STMTTRN>
  <TRNTYPE>DEBIT</TRNTYPE>
  <DTPOSTED>20050912120000</DTPOSTED>
  <TRNAMT>-3.26</TRNAMT>
  <FITID>2005091211</FITID>
  <NAME>POS PURCHASE - SOU STAPLES </NAME>
  </STMTTRN>
</OFX>

Author
8 Feb 2006 6:09 AM
Cor Ligthert [MVP]
Author
8 Feb 2006 7:00 AM
Don
Wonderful!   Excellent!   Perfect!   Fantastic!

Thanks, I appreciate your help.

    Don in Redmond

On Wed, 8 Feb 2006 07:09:38 +0100, "Cor Ligthert [MVP]"
<notmyfirstn***@planet.nl> wrote:

Show quoteHide quote
>Don,
>
>You can try this ones
>
>http://www.vb-tips.com/default.aspx?ID=06d9730e-9e33-404c-947a-c891846eaf0b
>
>I hope this helps,
>
>Cor
>