Originally posted by Sripathi Krishnamurthy:
XML is definitely an overhead if it is just storing the queries in a file.
I dont see any overhead here,because all queries are cached in hashmap they are parsed only once.
Had XML shown disadvantage then today there wont be any XML, every server runs on XML configuration of files
You dont have to use any parent child relatinship.
I can have queries of sql server and oracle in my XML file Same time and Just changing default tag I can use query of sql server or Oracle or My sql
You just need a place to store the query and retrieve it to execute in the code.
One has his own choice, one can choose property file or XML.I see XML extends readability. Also there are more advantages
You have to use a XML parser for parsing which can be avoided.
Don't we require any IO operation for reading property file
Parsing the XML for validity, well formedness is a overhead which can be avoided.
One time effort when writting XML,even writing a
java code is one time effort
Shailesh