Search Directory of XML files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    #1

    Search Directory of XML files

    All

    I have a directory of approximately 300 xml files that contain items and
    sales data and I want to search all of the files and read the item and sales
    elements from the files to aggregate together.

    Can anyone advise the best way to read the data from the xml files and store
    it somewhere to use later, maybe SQL Server?

    Thanks for any assistance that can be provided.

  • Joe Cool

    #2
    Re: Search Directory of XML files

    On Tue, 7 Jun 2005 04:48:05 -0700, "David"
    <David@discussi ons.microsoft.c om> wrote:
    [color=blue]
    >All
    >
    >I have a directory of approximately 300 xml files that contain items and
    >sales data and I want to search all of the files and read the item and sales
    >elements from the files to aggregate together.
    >
    >Can anyone advise the best way to read the data from the xml files and store
    >it somewhere to use later, maybe SQL Server?
    >
    >Thanks for any assistance that can be provided.[/color]

    I would use the Dir function to lookup the list of filenames, and
    then use the XML DOM to parse the data in the XML files.

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Search Directory of XML files

      "Joe Cool" <joecool@home.n et> schrieb:[color=blue][color=green]
      >>I have a directory of approximately 300 xml files that contain items and
      >>sales data and I want to search all of the files and read the item and
      >>sales
      >>elements from the files to aggregate together.[/color]
      >[...]
      > I would use the Dir function to lookup the list of filenames[/color]

      I think that using 'System.IO.Dire ctory.GetFiles' is more comfortable than
      using 'Dir'.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      Working...