Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 1516

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:46 GMT 2011 -->
<TITLE>
XQItemAccessor
</TITLE>

<META NAME="date" CONTENT="2011-12-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="XQItemAccessor";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/xml/xquery/XQItemAccessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XQItemAccessor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.xml.xquery</FONT>
<BR>
Interface XQItemAccessor</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery">XQItem</A>, <A HREF="../../../javax/xml/xquery/XQResultItem.html" title="interface in javax.xml.xquery">XQResultItem</A>, <A HREF="../../../javax/xml/xquery/XQResultSequence.html" title="interface in javax.xml.xquery">XQResultSequence</A>, <A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/saxon/xqj/SaxonXQForwardSequence.html" title="class in net.sf.saxon.xqj">SaxonXQForwardSequence</A>, <A HREF="../../../net/sf/saxon/xqj/SaxonXQItem.html" title="class in net.sf.saxon.xqj">SaxonXQItem</A>, <A HREF="../../../net/sf/saxon/xqj/SaxonXQSequence.html" title="class in net.sf.saxon.xqj">SaxonXQSequence</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>XQItemAccessor</B></DL>
</PRE>

<P>
This interface represents a common interface for accessing the values of
 an XQuery item. 
 All the get functions raise an exception if the underlying sequence object 
 is not positioned on an item (e.g. if the sequence is positioned before
 the first item or after the last item). 
 <br>
 <br>
 Example -
 <pre>
 
  XQPreparedExpression expr = conn.prepareExpression("for $i ..");
  XQSequence result = expr.executeQuery();

  // create the ItemTypes for string and integer
  XQItemType strType = conn.createAtomicType(XQItemType.XQBASETYPE_STRING);
  XQItemType intType = conn.createAtomicType(XQItemType.XQBASETYPE_INTEGER);
 
  // posititioned before the first item
  while (result.next())
  {
    // If string or any of its subtypes, then get the string value out
 
    if (result.instanceOf(strType))
      String str = result.getAtomicValue();
    else if (result.instanceOf(intType))
       // if it is exactly an int
      int intval = result.getInt();
      ...
 
    // Alternatively, you can get the exact type out.
    XQItemType type = result.getItemType();
 
    // Now perform the comparison..
    if (type.equals(intType))
    { ... };
  
  }
 </pre>

 See also: 
 <ul>
 <li> <i>Table 6 - XQuery Atomic Types and Corresponding Java Object Types,
  XQuery API for Java (XQJ) 1.0</i>, for mapping of XQuery atomic
 types to Java object types. For example, if the XQuery value returned is 
 of type <code>xs:unsignedByte</code>, then calling the <code>getObject()</code> method 
 will return a Java object of type <code>java.lang.Short</code>.
 </li>
 <li> <i>Table 7 - XQuery Node Types and Corresponding Java Object Types
  XQuery API for Java (XQJ) 1.0</i>, for the mapping of XQuery node types
 to the corresponding Java object types. For example, if the XQuery value
 returned is an element node, then calling the <code>getObject()</code> or 
 <code>getNode()</code> method will return a Java object of type 
 <code>org.w3.dom.Element</code>.
 </li>
 </ul>
 
 <p/>
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getAtomicValue()">getAtomicValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a Java <code>String</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getBoolean()">getBoolean</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>boolean</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getByte()">getByte</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>byte</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getDouble()">getDouble</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>double</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getFloat()">getFloat</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>float</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getInt()">getInt</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as an <code>int</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getItemAsStream()">getItemAsStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the current item as an <code>XMLStreamReader</code> object, as described
 in <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getItemAsString(java.util.Properties)">getItemAsString</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item  according to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getItemType()">getItemType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the type of the item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getLong()">getLong</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>long</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getNode()">getNode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the item as a DOM node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getNodeUri()">getNodeUri</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the URI for this item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getObject()">getObject</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as an <code>Object</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#getShort()">getShort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current item as a <code>short</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#instanceOf(javax.xml.xquery.XQItemType)">instanceOf</A></B>(<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the item "matches" an item type, as defined in
 <a href="http://www.w3.org/TR/xquery/#id-matching-item"><i>2.5.4.2
 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.OutputStream, java.util.Properties)">writeItem</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#writeItem(java.io.Writer, java.util.Properties)">writeItem</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
          <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#writeItemToResult(javax.xml.transform.Result)">writeItemToResult</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the current item to a <code>Result</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQItemAccessor.html#writeItemToSAX(org.xml.sax.ContentHandler)">writeItemToSAX</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxhdlr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the current item to a SAX handler, as described in
 in <i>Section 12.2 Serializing an XDM instance into a SAX event stream,
 XQuery API for Java (XQJ) 1.0</i>.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getBoolean()"><!-- --></A><H3>
getBoolean</H3>
<PRE>
boolean <B>getBoolean</B>()
                   throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>boolean</code>. 
 The current item must be an atomic value of type <code>xs:boolean</code>
 or a subtype.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>boolean</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>boolean</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getByte()"><!-- --></A><H3>
getByte</H3>
<PRE>
byte <B>getByte</B>()
             throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>byte</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>byte</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>byte</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>byte</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getDouble()"><!-- --></A><H3>
getDouble</H3>
<PRE>
double <B>getDouble</B>()
                 throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>double</code>.
 The current item must be an atomic value of type <code>xs:double</code>
 or a subtype.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>double</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>double</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getFloat()"><!-- --></A><H3>
getFloat</H3>
<PRE>
float <B>getFloat</B>()
               throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>float</code>.
 The current item must be an atomic value of type <code>xs:float</code>
 or a subtype.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>float</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>float</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getInt()"><!-- --></A><H3>
getInt</H3>
<PRE>
int <B>getInt</B>()
           throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as an <code>int</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>int</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an <code>int</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>int</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getItemType()"><!-- --></A><H3>
getItemType</H3>
<PRE>
<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> <B>getItemType</B>()
                       throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the type of the item.
 <br>

 On a forward only sequence this method can be called independent of any
 other get or write method. It will not raise an error if such method has
 been called already, nor will it affect subsequent invocations of any
 other get or write method.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the type of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the type of the item,
                            or (2) the underlying sequence or item is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getAtomicValue()"><!-- --></A><H3>
getAtomicValue</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getAtomicValue</B>()
                      throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a Java <code>String</code>. The current item
 must be an atomic value. This function casts the current item to an
 <code>xs:string</code> value according to the casting rules defined in 
 <a href="http://www.w3.org/TR/xpath-functions/#casting-from-strings">
 <i>17.1.2 Casting to xs:string and xs:untypedAtomic, XQuery 1.0 and
 XPath 2.0 Functions and Operators</i></a>,
 and then returns the value as a Java <code>String</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the string representation of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the item's value,
                            (2) the item is not an atomic value,
                            (3) there is an error when casting the
                            item to a string representation,
                            (4) the underlying sequence or item is in a
                            closed state, or (5) in the case of forward only
                            sequences, a get or write method was already
                            invoked on the current item</DL>
</DD>
</DL>
<HR>

<A NAME="getLong()"><!-- --></A><H3>
getLong</H3>
<PRE>
long <B>getLong</B>()
             throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>long</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>long</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>long</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>long</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getNode()"><!-- --></A><H3>
getNode</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A> <B>getNode</B>()
             throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the item as a DOM node. The current item must be a node.
 The type of the returned DOM node is governed by <i>Table 7 -
 XQuery Node Types and Corresponding Java Object Types  XQuery
 API for Java (XQJ) 1.0</i>

 The instance of the returned node is implementation dependent. The node
 may be a reference or a copy of the internal state of the item. It is
 advisable to make a copy of the node if the application plans to modify
 it.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a DOM node representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) the current item is not a node, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getNodeUri()"><!-- --></A><H3>
getNodeUri</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A> <B>getNodeUri</B>()
               throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Returns the URI for this item. If the item is a document node, then this
 method returns the absolute URI of the resource from which the document
 node was constructed. If the document URI is not available, then the
 empty string is returned. If the document URI is available, the returned
 value is the same as if <code>fn:document-uri</code> were evaluated on this document
 node. If the item is of a node kind other than document node, then the
 returned URI is implementation-defined.<br>

 On a forward only sequence this method can be called independent of any
 other get or write method. It will not raise an error if such method has
 been called already, nor will it affect subsequent invocations of any
 other get or write method on the current item.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the document URI for this document node or the empty string if
                            not available. For other node kinds, the result is
                            implementation-defined
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) the current item is not a node, (3) if the
                            underlying sequence or item is in a closed state</DL>
</DD>
</DL>
<HR>

<A NAME="getObject()"><!-- --></A><H3>
getObject</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getObject</B>()
                 throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as an <code>Object</code>. 

 The data type of the returned object will be the Java <code>Object</code>
 type as specified in <i>14.4 Mapping an XQuery Atomic Value to a
 Java Object Type and 14.5 Mapping an XQuery Node to a Java Object Type,
 XQuery API for Java (XQJ) 1.0</i>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an object representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) if there are errors accessing the current item,
                            (2) if the underlying sequence or item is in a closed state,
                            or (3) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="getItemAsStream()"><!-- --></A><H3>
getItemAsStream</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A> <B>getItemAsStream</B>()
                                throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Read the current item as an <code>XMLStreamReader</code> object, as described
 in <i>Section 12.1 Serializing an XDM instance into a StAX event stream
 (XMLStreamReader), XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in which case a 
 <code>XQException</code> is thrown.
 
 While the stream is being read, the application MUST NOT do any other
 concurrent operations on the underlying item or sequence.
 The operation on the stream is undefined if the underlying sequence
 is repositioned or the state of the underlying item or sequence
 is changed by concurrent operations.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an XML reader object as <code>XMLStreamReader</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current item
                            or the underlying sequence, (2) the underlying sequence
                            or item is in a closed state, (3) in the case of a forward
                            only sequence, a get or write method has already been
                            invoked on the current item, or (4) in case of an error
                            during serialization of the current item into a StAX event
                            stream as defined in <i>Section 12.1 Serializing an XDM
                            instance into a StAX event stream (XMLStreamReader), XQuery
                            API for Java (XQJ) 1.0</i></DL>
</DD>
</DL>
<HR>

<A NAME="getItemAsString(java.util.Properties)"><!-- --></A><H3>
getItemAsString</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getItemAsString</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
                       throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Serializes the current item  according to the
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.
 
 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
  API for Java (XQJ) 1.0</i> for more information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Returns:</B><DD>the serialized representation of the item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence,
                            a get or write method has already been
                            invoked on the current item, or (4)
                            if there are errors during serialization</DL>
</DD>
</DL>
<HR>

<A NAME="getShort()"><!-- --></A><H3>
getShort</H3>
<PRE>
short <B>getShort</B>()
               throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Gets the current item as a <code>short</code>.
 The current item must be an atomic value of type <code>xs:decimal</code>
 or a subtype, and its value must be in the value space of <code>short</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>short</code> representing the current item
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the conversion of the current item to a
                            <code>short</code> fails, (2) if there are
                            errors accessing the current item, (3) if the
                            underlying sequence or item is in a closed state,
                            or (4) in the case of forward only sequences, a
                            get or write method was already invoked on the
                            current item</DL>
</DD>
</DL>
<HR>

<A NAME="instanceOf(javax.xml.xquery.XQItemType)"><!-- --></A><H3>
instanceOf</H3>
<PRE>
boolean <B>instanceOf</B>(<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A>&nbsp;type)
                   throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Checks if the item "matches" an item type, as defined in
 <a href="http://www.w3.org/TR/xquery/#id-matching-item"><i>2.5.4.2
 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language</i></a>.

 You can use this method to first check the type of the result before 
 calling the specific get methods. 
 <br>
 <br>
 Example -
 <pre>
  ...
  XQItemType strType = conn.createAtomicType(XQItemType.XQBASETYPE_STRING);
  XQItemType nodeType = conn.createNodeType();

  XQSequence result = preparedExpr.executeQuery();
  while (result.next())
  {
     // Generic check for node.. 
     if (result.instanceOf(nodeType))
        org.w3.dom.Node node = result.getNode();
     else if (result.instanceOf(strType))
        String str = result.getAtomicValue();
   }
 </pre>
 <br>
 If either the type of the <code>XQItemAccessor</code> or the input 
 <code>XQItemType</code> is not a built-in type, then this method is 
 allowed to raise exception if it can NOT determine the instanceOf 
 relationship due to the lack of the access of
 the XML schema that defines the user defined schema types if the
 <code>XQMetaData.isUserDefinedXMLSchemaTypeSupported()</code> method
 returns <code>false</code>.
 <br>
 Otherwise, this method must determine if the type of the
 <code>XQItemAccessor</code>  is an instance of the input
 <code>XQItemType</code>. Note even if 
 <code>isUserDefinedXMLSchemaTypeSupported()</code> returns <code>false</code>,
 an XQJ implementation may still be able to determine the instanceOf
 relationship for certain cases involving user defined schema type.
 For example, if the type of an <code>XQItemAccessor</code> is of
 <code>mySchema:hatSize</code> sequence type and the input parameter 
 <code>XQItemType</code> is of <code>item()</code> sequence type, 
 the return value for instanceOf relationship should always be <code>true</code>
 even though the XQJ implementation does not know the precise type
 information of <code>mySchema:hatSize</code> type defined in XML
 schema <code>'mySchema'</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - item type to match
<DT><B>Returns:</B><DD><code>true</code> if this item matches
                            the input item type as defined in
                            <a href="http://www.w3.org/TR/xquery/#id-matching-item">
                            <i>2.5.4.2 Matching an Item Type and an Item,
                            XQuery 1.0: An XML Query Language</i></a>,
                            and <code>false</code> if it does not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the item's
                            type, (2) if the underlying sequence or item
                            is in a closed state, (3) if the implementation
                            is unable to determine the schema definition of a
                            user defined schema type, or (4) the <code>type</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItem(java.io.OutputStream, java.util.Properties)"><!-- --></A><H3>
writeItem</H3>
<PRE>
void <B>writeItem</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;os,
               <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
               throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.

 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>os</CODE> - the output stream into which the current item is
                            to be serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            (4) if there are errors during serialization, or 
                            (5) the <code>os</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItem(java.io.Writer, java.util.Properties)"><!-- --></A><H3>
writeItem</H3>
<PRE>
void <B>writeItem</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A>&nbsp;ow,
               <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;props)
               throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Serializes the current item to a <code>Writer</code> according to
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>.
 
 Serialization parameters, which influence how serialization is
 performed, can be specified. Refer to the 
 <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>
 and <i>Section 12 Serialization, XQuery
 API for Java (XQJ) 1.0</i> for more information.
 <br>
 <br>
 Warning: When outputting to a <code>Writer</code>, make sure the writer's encoding
 matches the encoding parameter if specified as a property or the default
 encoding.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ow</CODE> - the writer object into which the current item is to be
                            serialized<DD><CODE>props</CODE> - specifies the serialization parameters,
                            <code>null</code> is considered equivalent to an empty
                            <code>Properties</code> object
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state,
                            (3) in the case of a forward only sequence, a get or
                            write method has already been invoked on the current item,
                            (4) if there are errors during serialization, or
                            (5) the <code>ow</code> parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItemToSAX(org.xml.sax.ContentHandler)"><!-- --></A><H3>
writeItemToSAX</H3>
<PRE>
void <B>writeItemToSAX</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/org/xml/sax/ContentHandler.html?is-external=true" title="class or interface in org.xml.sax">ContentHandler</A>&nbsp;saxhdlr)
                    throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Writes the current item to a SAX handler, as described in
 in <i>Section 12.2 Serializing an XDM instance into a SAX event stream,
 XQuery API for Java (XQJ) 1.0</i>.

 Note that the serialization process might fail, in
 which case a <code>XQException</code> is thrown. 

 The specified <code>org.xml.sax.ContentHandler</code> can optionally implement the
 <code>org.xml.sax.LexicalHandler</code> interface. An implementation must check if the
 specified <code>ContentHandler</code> implements <code>LexicalHandler</code>.
 If the handler is a <code>LexicalHandler</code> comment nodes are reported, otherwise
 they will be silently ignored.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>saxhdlr</CODE> - the SAX content handler, optionally a lexical handler
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state, (3) in the case
                            of a forward only sequence, a get or write method has
                            already been invoked on the current item, (4) in case
                            of an error while serializing the XDM instance
                            into a SAX event stream, or (5) the <code>saxhdlr</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<HR>

<A NAME="writeItemToResult(javax.xml.transform.Result)"><!-- --></A><H3>
writeItemToResult</H3>
<PRE>
void <B>writeItemToResult</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result)
                       throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE>
<DL>
<DD>Writes the current item to a <code>Result</code>. First the item is
 normalized as described in <a href="http://www.w3.org/TR/xslt-xquery-serialization/">
 <i>XSLT 2.0 and XQuery 1.0 serialization</i></a>. Subsequently it is
 serialized to the <code>Result</code> object.<br>

 Note that the normalization process can fail, in which case an
 <code>XQException</code> is thrown.

 An XQJ implementation must at least support the following implementations:
 <ul>
   <li><code>javax.xml.transform.dom.DOMResult</code></li>
   <li><code>javax.xml.transform.sax.SAXResult</code></li>
   <li><code>javax.xml.transform.stream.StreamResult</code></li>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>result</CODE> - the result object into which the item is to be serialized
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) there are errors accessing the current
                            item or the underlying sequence, (2) the underlying
                            sequence or item is in a closed state, (3) in the case
                            of a forward only sequence, a get or write method has
                            already been invoked on the current item, (4) in case
                            of an error while serializing the current item into the
                            <code>Result</code> object, or (5) the <code>result</code>
                            parameter is <code>null</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/xml/xquery/XQItemAccessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XQItemAccessor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.
</BODY>
</HTML>