2014년 12월 13일 토요일

Mongo XML

Is Mongo a good fit for storing XML data?

If the xml data has an xsd does this assist. It seems xml is the format I keep getting supplied data in, it seems somewhat illogical as it just means I have to xquery it to Hey the data oUT.

So is Mongo a good fit fit managing the import and storage of whole xml files; so that csv data can be created from Mongo and also data displayed from Mongo to the Web?

If yes what toils work with Mongo best to achieve this abs maintain a reliable xml feed.



Mongo is not a solution I would think of for storing XML; But if you convert between JSON and XML, it is a great solution for JSON data. 

It seems to me that if you store plain xml it would be as text and you would gain nothing from the structure of the xml. I convert between JSON and XML with good results, keeping the data in JSON in mongo and use the XML rendition for the applications.



Yeah we do the same thing, we wrote a small conversion tool that converts XML to JSON and back.  We use certain conventions like putting underscore (_) before a field name means it is an actual XML attribute,  things like that.   It works well, you run into trouble if the XML has mixed content (sub-tags and content interspersed within another tag) but other than that works great.   Nice advantage is that you can do "in place" updates of content using mongo, fairly robust language for querying (and fast).   It fits our needs but I would think there are other viable XML database alternatives out there too.



Thanks for your experiences. There are direct options for xml databases the best option to me is basex.

Mongo has had a lot of development and community so seems a more supported solution.


댓글 없음:

댓글 쓰기