Using DataDirect XQuery™ with XML Sources

Buy Now | Download | Learn More

DataDirect XQuery is designed for performance and scalability when querying XML sources. With DataDirect XQuery you can query XML DOM trees, SAX or StAX sources, XML documents available through ftp:, http:, and file: URL schemes, and you can write your own URI resolver to support virtually any XML repository. DataDirect XQuery intelligently queries VERY large XML documents (up to multiple Gigabytes), as such documents can be larger than the available memory

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, and streams of SAX or StAX events

DataDirect XQuery is optimized for querying large XML files, which can be many Gigabytes. Techniques known as Document Projection and Streaming are used to dramatically reduce the memory required to query such documents. Using Document Projection, DataDirect XQuery analyzes the query before parsing any XML input, and materializing in memory only the parts of the document strictly needed to perform the query. If Document Streaming is enabled, DataDirect XQuery parses the document incrementally, discarding parts that are no longer needed for query processing. Using such techniques, documents significantly larger than the 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

Thanks to lazy evaluation and the supported streaming interfaces, very large query results can be handled in a highly scalable manner.