From Saxon 9.2, this method always creates a new tree, it never wraps or returns an existing tree.
@return the document node of the constructed document @throws XPathException if any errors occur during document parsing or validation. Detailederrors occurring during schema validation will be written to the ErrorListener associated with the AugmentedSource, if supplied, or with the Configuration otherwise. @since 8.9. Modified in 9.0 to avoid copying a supplied document where this is notnecessary. Modified in 9.2 so that this interface always constructs a new tree; it never wraps an existing document, even if an AugmentedSource that requests wrapping is supplied.For additional control over the way in which the source document is processed, supply an {@link net.sf.saxon.AugmentedSource AugmentedSource} object and set appropriate options on the object.
@return the DocumentInfo representing the root node of the resulting document object.This method is retained for backwards compatibility; however, it is merely a wrapper around the method {@link Configuration#buildDocument}, which should be called in preference.
@param source Any javax.xml.transform.Source object representing the document againstwhich queries will be executed. Note that a Saxon {@link net.sf.saxon.om.DocumentInfo DocumentInfo}(indeed any {@link net.sf.saxon.om.NodeInfo NodeInfo}) can be used as a Source. To use a third-party DOM Document as a source, create an instance of {@link javax.xml.transform.dom.DOMSource DOMSource} to wrap it.For additional control over the way in which the source document is processed, supply an {@link net.sf.saxon.AugmentedSource AugmentedSource} object and set appropriateoptions on the object.
@return the DocumentInfo representing the root node of the resulting document object. @since 8.4 @deprecated since 9.2: use {@link Configuration#buildDocument(javax.xml.transform.Source)} Note: underlying stream reader will not be closed by calling this method.
@param r Stream reader from which input is read.
@return Document
- DOM document object.
@throws XMLStreamException If the reader threw such exception (toindicate a parsing or I/O problem)
A new tree will be built, using either the Tiny Tree or the Linked Tree implementation, except under the following circumstances:
The choice between a tiny tree and a linked tree is determined first be the properties of the AugmentedSource if that's what is supplied; otherwise by the properties of this Configuration. @return the document node of the constructed or wrapped document @throws XPathException if any errors occur during document parsing or validation. Detailederrors occurring during schema validation will be written to the ErrorListener associated with the AugmentedSource, if supplied, or with the Configuration otherwise. @since 8.9. Modified in 9.0 to avoid copying a supplied document where this is notnecessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|