public class NodeSource extends java.lang.Object implements ActiveSource
NodeInfo. The class implements the
ActiveSource interface, allowing the content to be delivered to a Receiver.| Constructor and Description |
|---|
NodeSource(NodeInfo node)
Create a
NodeSource that wraps a supplied node |
| Modifier and Type | Method and Description |
|---|---|
void |
deliver(Receiver receiver,
ParseOptions options)
Deliver the content of the source to a supplied Receiver.
|
NodeInfo |
getNode()
Get the node represented by this
NodeSource object |
java.lang.String |
getSystemId()
Get the system identifier that was set with setSystemId.
|
void |
setSystemId(java.lang.String systemId)
Set the system identifier for this Source.
|
public NodeSource(NodeInfo node)
NodeSource that wraps a supplied nodenode - the supplied nodepublic void deliver(Receiver receiver, ParseOptions options) throws XPathException
For many (but not all) implementations of Source, this method consumes
the source and can therefore only be called once.
deliver in interface ActiveSourcereceiver - the receiver to which events representing the parsed XML document will be sentoptions - options for parsing the sourceXPathException - if parsing fails for any reason. The detailed diagnostics will
have been sent to the error reporter.public void setSystemId(java.lang.String systemId)
The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings.
setSystemId in interface javax.xml.transform.SourcesystemId - The system identifier as a URL string.public java.lang.String getSystemId()
getSystemId in interface javax.xml.transform.Sourcepublic NodeInfo getNode()
NodeSource objectCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.