• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Statements in XML document

 
Sandeep Shahane
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to XML. I wish to store all my application SQL statements in an XML file. Can anybody please guide me where can I find XML strucutre for the same and XML parsers also.
Is using XML for storing SQL statements is a good practice ?




 
Paul Clapham
Sheriff
Pie
Posts: 20738
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For beginners, just use the XML parser (and other tools) built into Java (1.4 or later). There are many ways to store SQL statements in XML. The simplest is like this:

<SQL>Select name, address from supplier</SQL>

Or you could break the statement up into its parts and store them in separate elements. I would suggest learning the basics of XML before you make any decisions on how to use it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic