public class QueryResult extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
sendWrappedSequence(SequenceIterator iterator,
Receiver destination)
Take a sequence supplied in the form of an iterator and generate a wrapped represention of the
items in the sequence, the wrapped representation being a sequence of events sent to a supplied
Receiver.
|
static void |
serialize(NodeInfo node,
Result destination,
Properties outputProperties,
Configuration config)
Serialize a document containing wrapped query results (or any other document, in fact)
as XML.
|
static void |
serializeSequence(SequenceIterator results,
Configuration config,
OutputStream destination,
Properties outputProps)
Serialize an arbitrary sequence, without any special wrapping.
|
static void |
serializeSequence(SequenceIterator results,
Configuration config,
PrintWriter writer,
Properties outputProps)
Serialize an arbitrary sequence, without any special wrapping.
|
static DocumentInfo |
wrap(SequenceIterator iterator,
Configuration config)
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
|
public static String RESULT_NS
public static DocumentInfo wrap(SequenceIterator iterator, Configuration config) throws XPathException
iterator - The values to be wrappedconfig - The Saxon configuration used to evaluate the queryXPathExceptionpublic static void sendWrappedSequence(SequenceIterator iterator, Receiver destination) throws XPathException
iterator - the input sequencedestination - the Receiver to accept the wrapped outputXPathExceptionpublic static void serialize(NodeInfo node, Result destination, Properties outputProperties, Configuration config) throws XPathException
node - The document or element to be serializeddestination - The Result object to contain the serialized formoutputProperties - Serialization optionsconfig - The ConfigurationXPathException - If serialization failspublic static void serializeSequence(SequenceIterator results, Configuration config, OutputStream destination, Properties outputProps) throws XPathException
results - the sequence to be serializedconfig - the configuration (gives access to information such as the NamePool)destination - the output stream to which the output is to be writtenoutputProps - a set of serialization properties as defined in JAXPXPathException - if any failure occurspublic static void serializeSequence(SequenceIterator results, Configuration config, PrintWriter writer, Properties outputProps) throws XPathException
results - the sequence to be serializedconfig - the configuration (gives access to information such as the NamePool)writer - the writer to which the output is to be writtenoutputProps - a set of serialization properties as defined in JAXPXPathException - if any failure occurs