AbstractNode is an abstract base class for tree implementors
to use for implementation inheritence.
| Modifier and Type | Field and Description |
|---|---|
| private static final DocumentFactory | DOCUMENT_FACTORY
The |
| protected static final String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Node | asXPathResult(Element
DOCUMENT ME! parent)Implements org.
|
| public Object | clone()
Overrides java. Implements org.
|
| public Pattern | |
| public XPath | createXPath(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public NodeFilter | |
| protected Node | |
| public Node | |
| public Document | getDocument()
Implements org.
|
| protected DocumentFactory | |
| public String | |
| public short | |
| public String | |
| public Element | getParent()
Implements org.
|
| public String | getPath()
Implements org. Returns the XPath expression which will return a node set containing the given node such as /a/b/@c. |
| public String | getStringValue()
Implements org. |
| public String | |
| public String | getUniquePath()
Implements org. Returns the XPath expression which will return a nodeset of one node which is the current node. |
| public boolean | hasContent()
Implements org.
|
| public boolean | isReadOnly()
Implements org.
|
| public boolean | matches(String
is an XPath expression patternText)Implements org.
|
| public Number | numberValueOf(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public List | selectNodes(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public List | selectNodes(String
is the XPath expression to be evaluated xpathExpression, String is the XPath expression used to compare the results by for
sorting comparisonXPathExpression)Implements org.
|
| public List | selectNodes(String
is the XPath expression to be evaluated xpathExpression, String is the XPath expression used to compare the results by for
sorting comparisonXPathExpression, boolean if this parameter is true then duplicate values (using the
comparisonXPathExpression) are removed from the result List. removeDuplicates)Implements org.
|
| public Object | selectObject(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public Node | selectSingleNode(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public void | setDocument(Document
is the new document of this node. document)Implements org.
|
| public void | setName(String
is the new name of this node name)Implements org.
Sets the text data of this node or this method will throw an
|
| public void | setParent(Element
is the new parent of this node. parent)Implements org.
|
| public void | setText(String
is the new textual value of this node text)Implements org.
Sets the text data of this node or this method will throw an
|
| public boolean | supportsParent()
Implements org.
|
| public String | valueOf(String
is the XPath expression to be evaluated xpathExpression)Implements org.
|
| public void | write(Writer
is the writer)Writer to output the XML toImplements org.
|
| DOCUMENT_FACTORY | back to summary |
|---|---|
| private static final DocumentFactory DOCUMENT_FACTORY The | |
| NODE_TYPE_NAMES | back to summary |
|---|---|
| protected static final String[] NODE_TYPE_NAMES | |
| AbstractNode | back to summary |
|---|---|
| public AbstractNode() | |
| asXPathResult | back to summary |
|---|---|
| public Node asXPathResult(Element parent) Implements org. Doc from org.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Implements org. Doc from org.
| |
| createPattern | back to summary |
|---|---|
| public Pattern createPattern(String patternText) | |
| createXPath | back to summary |
|---|---|
| public XPath createXPath(String xpathExpression) Implements org. Doc from org.
| |
| createXPathFilter | back to summary |
|---|---|
| public NodeFilter createXPathFilter(String patternText) | |
| createXPathResult | back to summary |
|---|---|
| protected Node createXPathResult(Element parent) | |
| detach | back to summary |
|---|---|
| public Node detach() Implements org. Doc from org. Removes this node from its parent if there is one. If this node is the root element of a document then it is removed from the document as well. This method is useful if you want to remove a node from its source document and add it to another document. For example Node node = ...; Element someOtherElement = ...;
someOtherElement.add( node.detach() );
| |
| getDocument | back to summary |
|---|---|
| public Document getDocument() Implements org. Doc from org.
This method is an optional feature and may not be supported for all
| |
| getDocumentFactory | back to summary |
|---|---|
| protected DocumentFactory getDocumentFactory() | |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org.
| |
| getNodeType | back to summary |
|---|---|
| public short getNodeType() Implements org. Doc from org. Returns the code according to the type of node. This makes processing nodes polymorphically much easier as the switch statement can be used instead of multiple if (instanceof) statements.
| |
| getNodeTypeName | back to summary |
|---|---|
| public String getNodeTypeName() Implements org. Doc from org. DOCUMENT ME!
| |
| getParent | back to summary |
|---|---|
| public Element getParent() Implements org. Doc from org.
This method is an optional feature and may not be supported for all
| |
| getPath | back to summary |
|---|---|
| public String getPath() Implements org. Doc from org. Returns the XPath expression which will return a node set containing the given node such as /a/b/@c. No indexing will be used to restrict the path if multiple elements with the same name occur on the path.
| |
| getStringValue | back to summary |
|---|---|
| public String getStringValue() Implements org. Doc from org. Returns the XPath string-value of this node. The behaviour of this method is defined in the XPath specification .
| |
| getText | back to summary |
|---|---|
| public String getText() Implements org. Doc from org. Returns the text of this node.
| |
| getUniquePath | back to summary |
|---|---|
| public String getUniquePath() Implements org. Doc from org. Returns the XPath expression which will return a nodeset of one node which is the current node. This method will use the XPath index operator to restrict the path if multiple elements with the same name occur on the path.
| |
| hasContent | back to summary |
|---|---|
| public boolean hasContent() Implements org. Doc from org.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Implements org. Doc from org.
| |
| matches | back to summary |
|---|---|
| public boolean matches(String patternText) Implements org. Doc from org.
This method does not behave like the <xsl:if> element - if you want that behaviour, to evaluate if an XPath expression matches something, then you can use the following code to be equivalent... if ( node.selectSingleNode( "/some/path" ) != nulll )
| |
| numberValueOf | back to summary |
|---|---|
| public Number numberValueOf(String xpathExpression) Implements org. Doc from org.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectObject | back to summary |
|---|---|
| public Object selectObject(String xpathExpression) Implements org. Doc from org.
| |
| selectSingleNode | back to summary |
|---|---|
| public Node selectSingleNode(String xpathExpression) Implements org. Doc from org.
| |
| setDocument | back to summary |
|---|---|
| public void setDocument(Document document) Implements org. Doc from org.
This method should only be called from inside a
| |
| setName | back to summary |
|---|---|
| public void setName(String name) Implements org. Doc from org.
Sets the text data of this node or this method will throw an
| |
| setParent | back to summary |
|---|---|
| public void setParent(Element parent) Implements org. Doc from org.
This method should only be called from inside an
| |
| setText | back to summary |
|---|---|
| public void setText(String text) Implements org. Doc from org.
Sets the text data of this node or this method will throw an
| |
| supportsParent | back to summary |
|---|---|
| public boolean supportsParent() Implements org. Doc from org.
Some XML tree implementations are singly linked and only support downward navigation through children relationships. The default case is that both parent and children relationships are supported though for memory and performance reasons the parent relationship may not be supported.
| |
| valueOf | back to summary |
|---|---|
| public String valueOf(String xpathExpression) Implements org. Doc from org.
| |
| write | back to summary |
|---|---|
| public void write(Writer writer) throws IOException Implements org. Doc from org.
| |