2013年10月7日星期一

[ File Storage ] xml text file with the distinction

Want to use Java to write a book , not the database, need to be stored with the file , consider using a text file or XML, but I do not know what is the difference between the two , Baidu a moment that more rigorous XML structure , the time will not read faster ? Or similar ? Compared with that storage location, to ask you the god !
------ Solution ---------------------------------------- ----
stored data , then use the xml more convenient , because you can use a tool like dom4j xml file operation , makes change more convenient. If you simply use a text file , then estimated to be himself writes files. .
------ Solution ---------------------------------------- ----
XML just defined a rule , in accordance with such rules have been read to write someone to help you write the way, if you define a rule certainly also possible
- ---- Solution -------------------------------------------- < br> xqj can use XQuery database like SQL operations operate as xml

没有评论:

发表评论