A method and apparatus is provided for translating queries, such as path
expressions and SQL/XML constructs, into SQL statements to be executed
against an XML index, which improves processor time as opposed to
applying path expressions directly to the original XML documents to
extract the desired information. Simple path expressions, filter
expressions, descendant axes, wildcards, logical expressions, relational
expressions, literals, and other path expressions are all translated into
SQL for efficient querying of an XML index. Similarly, rules for
translating SQL/XML constructs into SQL are provided.