XQuery API for Java (XQJ) refers to the common Java API for the W3C XQuery 1.0 specification. The XQJ API enables Java programmers to execute XQuery against an XML data source (e.g. an XML database) while reducing or eliminating vendor lock in. The XQJ API provides Java developers with an interface to the XQuery Data Model. Its design is similar to the JDBC API which has a client/server feel and as such lends itself well to Server-based XML Databases and less well to client-side XQuery processors, although the "connection" part is a very minor part of the entire API. Users of the XQJ API can bind Java values to XQuery expressions, preventing code injection attacks. Also, multiple XQuery expressions can be executed as part of an atomic transaction. History and implementation The XQuery API for Java was developed at the Java Community Process as JSR 225. It had some big technology backers such as Oracle, IBM, BEA Systems, Software AG, Intel, Nokia and DataDirect. Version 1.0 of the XQuery API for Java Specification was released on June 24, 2009, along with JavaDocs, a reference implementation and a TCK (Technology Compatibility Kit) which implementing vendors must conform to. The XQJ classes are contained in the Java package javax.xml.xquery There is no (visible) activity to create a version of XQJ that provides support for XQuery 3.0 or 3.1, for example by providing Java bindings for additions to the data model such as functions, arrays, or maps. Functionality XQJ allows multiple implementations to exist and be used by the same application. XQJ connections support creating and executing XQuery expressions. Expressions may be updating and may include full text searches. XQJ represents XQuery expressions using one of the following classes: XQExpression – the expression is sent to the XQuery processor every time. XQPreparedExpression – the expression is cached and the execution path is pre-determined allowing it to be executed multiple times in an efficient manner. XQuery expressions return a result sequence of XDM items which in XQJ are represented through the XQResultSequence interface. The programmer can use an XQResultSequence to walk over individual XDM items in the result sequence. Each item in the sequence has XDM type information associated with it, such as its node type e.g. , or an XDM atomic type such as , or . XDM type information in XQJ can be retrieved via the XQItemType interface. Atomic XQuery items can