0

Can I use sqlite to query an XML file?

I want to implement a simple c++ application that can query XML files, is it possible using sqlite?

Aly Shmahell
  • 511
  • 2
  • 7
  • 18

1 Answers1

1

Not directly, no. You would have to import the XML data into a sqlite database and query the database. Depending on the structure of your XML, that may or may not work well. XPath might be a better solution for you.

EricS
  • 9,650
  • 2
  • 38
  • 34
  • What C++ Libraries/Implementations you know of do you suggest for both scenarios "Xpath" and "Importing"? I would be looking on my own, but any help would be appreciated... – Aly Shmahell Mar 14 '16 at 11:47
  • 1
    [This article on XML in iOS](https://www.raywenderlich.com/553/xml-tutorial-for-ios-how-to-choose-the-best-xml-parser-for-your-iphone-project) may be outdated, but is a good place to start. libxml2 is built into iOS - you can add it to your project and use it as described [here](http://stackoverflow.com/questions/6012030/adding-libxml2-in-xcode). – EricS Mar 14 '16 at 17:30