Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:11:31+00:00 2026-06-03T03:11:31+00:00

How can I use a XML file as a database and execute some basic

  • 0

How can I use a XML file as a database and execute some basic SELECT command only on it !
ex: select author from file.xml where title=”MyTitle”

<?xml version="1.0"?>
<catalog>
<book id="bk101">
  <author>Gambardella, Matthew</author>
  <title>XML Developer's Guide</title>
</book>
<book id="bk102">
  <author>Ralls, Kim</author>
  <title>Midnight Rain</title>
</book>
</catalog>

I’ve never worked with XML file (as DB) so have no code to put here, but hope someone have some solution !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:11:32+00:00Added an answer on June 3, 2026 at 3:11 am

    You can look into XPath. The System.XML.XmlDocument.SelectNodes method allows you to select matching nodes via XPath. It’s not SQL, but it’s a common way to find nodes in an XML document. The following example uses XPath to retrieve the authors of all the books with a title of “Midnight Rain”.

        Dim document As XmlDocument = New XmlDocument()
        document.Load("file.xml")
        Dim matches As XmlNodeList = document.SelectNodes("/catalog/book[title = 'Midnight Rain']/author")
        For Each node As XmlNode In matches
            'Do work
        Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to find an XML file I can use in lieu of a look-up
how can I use the same UI template (*.ui.xml file) with multiple Java objects
I can currently use sgml-pretty-print to pretty print an xml file in emacs, but
I need to parse a XML String so I can use some of the
What's the best API I can use to do some simple XML read/writing? I'm
Why all use binary files, if all can use XML ?
In SQL Server you can use an XML datatype and map it to relational
You can use XPath if you're binding the XML document in the XAML, but
Related: How can I use polymorphism in XML Serialization? I have a class I
Possible Duplicate: When is it OK to use an XML file to save information?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.