• Post Reply Bookmark Topic Watch Topic
  • New Topic

which is fast either reading from xml or reding from text file?  RSS feed

 
Kaleeswaran Karuppusamy
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to know which one is the best way that is reading value from xml or reading content from text


please suggest me
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assuming the XML is in a file then it is exactly the same. the cost is incurred when you want to parse the data. A text file contains text, and you can read this into memory but it won't do anything on its own.

XML data can be read into memory for the same cost, but then there is a 'cost' to convert it into a parsed XML structure. this structure allows lots of things to be done much easier and cheaper, but only after converting from text.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!