Storing .xml information in matlab

5 views (last 30 days)
Raj Tailor
Raj Tailor on 6 Nov 2018
Commented: Guillaume on 18 Dec 2019
Hello Everyone, I am trying to read rss feed in .xml file format. For further processing that information, I need to store it in some database, so that I can use it later. I tried using datastore function available in matlab but I was not able store .xml data in it.
Could anybody help me by providing more information on how can I store xml data?; and what other ways I can use.
  10 Comments
KAE
KAE on 18 Dec 2019
Edited: KAE on 18 Dec 2019
Guillame, I have the same problem: I want to read in a large XML file containing semi-structured data, pick the fields that are useful to me, and organize it so I can do some analysis. I would like to try your solution of creating a database to put the organized records into, but I am not sure where to start. I have a trial of the Database toolbox, so I could use that. Would I need to first create the database in mysql? It sounds like I can do it directly from Matlab here but I have to admit I am not clear how this all would look overall.
Guillaume
Guillaume on 18 Dec 2019
Note: I'm far from an expert on databases. I can write my own SQL queries and have created databases in sqlite, SQL server and (gasp!) Access and accessed some of these with matlab but it's been a while. Also, I don't have the database toolbox so I did my own communication with the database drivers.
Your question is very open ended. First question is: do you actually need a database? Wouldn't matlab tables be enough? If you do need a relational database, then the first thing you need to do is define a schema for your database. What tables, what relationship for these tables. You'd base that on the XML structure in this case. I've always done that design by hand (or with the built-in database editor that comes with the database), I've no idea what the database toolbox offers in this regard.
Nowadays, you've also got the NoSQL databases which may be more appropriate for semi-structured data. It's not something I've ever worked with.

Sign in to comment.

Accepted Answer

Stephan
Stephan on 6 Nov 2018
Edited: Stephan on 6 Nov 2018
Hi,
check this@FEX - there is also an improved version available.
Best regards
Stephan

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!