XML Input and Output


DataDirect XQuery® can query any of the following XML sources:

  • XML files
  • XML documents made available via user-written URI resolvers
  • XML stored in columns of relational databases
  • Java DOM trees

DataDirect XQuery® is optimized for querying large XML files, which can be many Gigabytes. We use techniques known as Document Projection and Streaming to dramatically reduce the memory required to query such documents. Using Document Projection, we analyze the query before parsing XML input, creating only the parts of the document needed by the query. If you enable streaming, we parse the document incrementally, discarding parts that are no longer needed for query processing. Using these techniques, documents significantly larger than available RAM can be queried. For many queries, memory consumption is constant and independent of the size of the input document.

DataDirect XQuery® supports the following output formats.

  • SAX
  • StAX
  • DOM
  • java.io.OutputStream
  • java.io.Writer

Because we use lazy evaluation and stream results, very large query results are handled efficiently.