We can consider an SQL query as an XML document. For example:
<select>
<elem>first_name</elem>
<elem>last_name</elem>
</select>
</from>
<elem>person</elem>
</from>
Since there is a somewhat defined structure of SQL queries, there should be a way to represent it as a DTD or XML schema and validate against either of them.
Maybe I am totally misunderstanding something here. Any hints?
Thanks.
|