Running an XQuery from Java
Added 26 Jul 2008
Once you have XPath and XQuery firmly in hand, and an XQJ implementation on your classpath, you're ready to write Java code and run your queries. There are two basic steps you'll follow in every program you write:
- Create/Access an XQuery data source.
- Execute your XQueries.
These
are both fairly simple steps, and as long as you're not switching
between different XQuery implementations, the first step stays the same
in all your programs. In fact, you might want to bundle up the code you
write to handle data source configuration and connection into a utility
class.