net.sf.saxon.query
Class QueryResult

java.lang.Object
  extended bynet.sf.saxon.query.QueryResult

public class QueryResult
extends java.lang.Object

This class takes the result sequence produced by a query, and wraps it as an XML document


Constructor Summary
QueryResult()
           
 
Method Summary
static void serialize(NodeInfo node, javax.xml.transform.Result destination, java.util.Properties outputProperties)
          Serialize a document containing wrapped query results (or any other document, in fact) as XML.
static DocumentInfo wrap(SequenceIterator iterator, NamePool pool)
          Take the results of a query (or any other SequenceIterator) and create an XML document containing copies of all items in the sequence, suitably wrapped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResult

public QueryResult()
Method Detail

wrap

public static DocumentInfo wrap(SequenceIterator iterator,
                                NamePool pool)
                         throws javax.xml.transform.TransformerException
Take the results of a query (or any other SequenceIterator) and create an XML document containing copies of all items in the sequence, suitably wrapped

Parameters:
iterator - The values to be wrapped
pool - NamePool to use for the constructed document
Returns:
the document containing the wrapped results
Throws:
javax.xml.transform.TransformerException

serialize

public static void serialize(NodeInfo node,
                             javax.xml.transform.Result destination,
                             java.util.Properties outputProperties)
                      throws javax.xml.transform.TransformerException
Serialize a document containing wrapped query results (or any other document, in fact) as XML.

Parameters:
node - The document or element to be serialized
destination - The Result object to contain the serialized form
outputProperties - Serialization options
Throws:
javax.xml.transform.TransformerException - If serialization fails