Storing .xml information in matlab

조회 수: 1 (최근 30일)
Raj Tailor
Raj Tailor 2018년 11월 6일
댓글: Guillaume 2019년 12월 18일
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
KAE
KAE 2019년 12월 18일
편집: KAE 2019년 12월 18일
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 2019년 12월 18일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Stephan
Stephan 2018년 11월 6일
편집: Stephan 2018년 11월 6일
Hi,
check this@FEX - there is also an improved version available.
Best regards
Stephan

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by