Results 1 to 4 of 4

Thread: XML Searching

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Philadelphia
    Posts
    47

    XML Searching

    I want to be able to read in an xml document and find the record that I am looking for and use the records information. I have already created the xml document using dataset.writexml method from a database query, but i want to query the xml file without requerying the database. ie search for a record in the xml file.

    Is there a simple way of doing this if i import the whole xml file into the program using datasets and then search the dataset?
    U S A
    Visual Studio .NET
    Windows XP

  2. #2
    Member HumanCompiler's Avatar
    Join Date
    Dec 2002
    Location
    Decatur, IN USA
    Posts
    52
    yah, your best bet would be to just load it into the dataset, then use a DataView to find the record(s) you're looking for.

    if you don't want to do that, you could just load the XML into an XMLDocument and do a .SelectNodes that would run an XPath Query and return what you're looking for to be read and/or modified
    -Erik Porter
    .NET MVP

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Originally posted by HumanCompiler
    ...if you don't want to do that, you could just load the XML into an XMLDocument and do a .SelectNodes that would run an XPath Query and return what you're looking for to be read and/or modified
    In order to do that you need to have msxml3 or 4 installed.

  4. #4
    Member HumanCompiler's Avatar
    Join Date
    Dec 2002
    Location
    Decatur, IN USA
    Posts
    52
    the original poster was talking about DataSets which means they're using the .NET Framework and MSXML4 is installed with the Framework so I made an assumption
    -Erik Porter
    .NET MVP

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