public class XMLStructuredInput extends Object implements StructuredInput
| Constructor and Description |
|---|
XMLStructuredInput(InputStream in,
boolean close)
Creates a new XMLStructuredInput for the given stream.
|
| Modifier and Type | Method and Description |
|---|---|
StructuredNode |
getNode(String xpath)
Returns the node denoted by the given xpath expression
|
void |
setNewParent(StructuredNode node)
Overrides the root node to reset this document to a subtree of the original input
|
String |
toString() |
public XMLStructuredInput(InputStream in, boolean close) throws IOException
in - the InputStream containing the xml data.close - determines whether the stream should be closed after parsing or notIOException - if an io error occurs while parsing the input xmlpublic StructuredNode getNode(String xpath) throws XPathExpressionException
StructuredInputgetNode in interface StructuredInputxpath - the xpath used to query the nodeXPathExpressionException - if an invalid xpath was givenpublic void setNewParent(@Nonnull StructuredNode node)
node - the new root node of this inputCopyright © 2018. All rights reserved.