Searching an XML file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Searching an XML file

  1. #1
    Join Date
    Apr 2007
    Location
    Dublin, Ireland
    Posts
    1

    Question Searching an XML file

    Hi,

    I'm new to xml and have a question about searching an xml file and returning a result.

    I have a dataset with related 2 tables (for simplicity) which I convert to an XML file.

    e.g tblPerson (parent) and tblOccupation (child)

    tblPerson Columns
    ClientCode (pk)
    FirstName
    Surname

    tblOccupation Columns
    ClientCode (pk,fk)
    Occupation

    Is it possible to search the xml file for all matching values (e.g "WHERE Occupation = 'Vodafone' ") in the childTable and have it return/create an XML file with the Dataset schema and all the parent nodes (tblPerson Rows) that matched the search criteria.

    I would then be able to read the xml file back into my DataSet which would update the ParentTable to only show the rows whose childTable matched the search criteria.

    I don't need to know how to do this (although it'd be nice), I just need to know if this is possible so I don't waste time trying to learn how to do it only to find out it can't be done.

    I hope this is clear anyway.
    Thanks
    Ger

  2. #2
    Join Date
    Nov 2005
    Posts
    15
    It sure is possible. You can use System.XML for it. Then work with XmlDocument, XmlElement and Nodes to search what you are looking for.
    You can find enough examples on the net.
    Programming code is like magic, just use the right code (magic words) to make happen what you want...

Similar Threads

  1. updating xml file from VB6
    By smithg22 in forum VB Classic
    Replies: 9
    Last Post: 04-12-2005, 06:23 PM
  2. XML to Text File using CopyBook
    By Nischal in forum XML
    Replies: 0
    Last Post: 03-21-2002, 06:10 PM
  3. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM
  4. How do i search within a xml file?
    By Kelvin Teh in forum XML
    Replies: 3
    Last Post: 02-16-2001, 10:09 AM
  5. Display xml file
    By rana in forum XML
    Replies: 5
    Last Post: 12-09-2000, 11:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center