Community discussion forum

help with vb.net and xml

  • 1 year ago

    I am new to this VB/XML thing and am trying to figure out something. Can I have a line like : http://xyz.company.com/PackPoint/ajax/xmlPackoutViewer.php?Event=RunPackoutLookup&Company=HB&Line=L1&RunDate=2008-09-09

    which returns this xml stream of data:

    <?xml version="1.0" encoding="ISO-8859-1" ?>

      <!DOCTYPE Packouts (View Source for full doctype...)>
    - <Packouts>
      <Company Desc="">HB</Company>
      <Line>L1</Line>
    - <RunGroup>
      <Date>2008-09-09</Date>
      <Run>5</Run>
      <PoolID>09D2102</PoolID>
      <GrowerID Desc="English Bros">ENGLISH</GrowerID>
      <GrowerBlock>8-1S</GrowerBlock>
      <Commodity Desc="Red Grapefruit">G</Commodity>
      <Variety Desc="Sprdk Red Gft">21</Variety>
      <ReceivedUofM Desc="Field Box">BOX</ReceivedUofM>
      <ClearedUofM Desc="4/5 Bushel">4D</ClearedUofM>
      <Received>522</Received>
      <Cleared>1044</Cleared>
      <Packed>1369</Packed>

     Using the line above can I call it from vb.net have it return the data and then read the data that was returned and put it into a database? I know its a lot but I am starting with the big guns on this one. Any help or directions on this would be appricated...

    Jim 

  • 1 year ago

    It may be very simple. If I leap generation of XML in the web, you may use following:

    Dim ds As New DataSet()
    ds.ReadXml(Application.StartupPath & "\x.xml", XmlReadMode.Auto) 'path can be http://myfeed/feeds/rss
    Me.DataGridView1.DataSource = ds.Tables(0) 'use 2 for most online RSS feeds

    Just look how you can extract data from DataTable

    you can also take a look at DataAdapter for automation for storing DataTable to physical database

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!