Search code examples
javaxmldomsaxstax

xml or normal file for creating a reference file


I want to create a reference file its skelton is as follows:

cityname=...
id=.... lat=... lon=...
targetfile=...

so that the input I receive from the user is just the lat and lon. and then I the I should give the user the name of the target file.

my question is,should I create the reference file as normal file or as xml. Note: the reference file may contain numerous lines.


Solution

  • Normal file

    • Fast (to develop that is)
    • Simple
    • Requires hand made logic if you want to do anything special with it
    • You can't easily check if the file is well formed or not

    XML file

    • Slower to develop
    • More complicated especially if you're not used to working with XML
    • Plenty of ready made code to help you process your file
    • You can create an XML schema to make sure that the file is well formed