|
java.lang.Object
Node
com.aspose.words.CompositeNode
- All Implemented Interfaces:
- java.lang.Iterable, java.lang.Cloneable, java.lang.Iterable
- Direct Known Subclasses:
- Cell, Document, InlineStory, Paragraph, Row, Section, ShapeBase, SmartTag, Story, Table
public abstract class CompositeNode - extends Node
Base class for nodes that can contain other nodes.
A document is represented as a tree of nodes, similar to DOM or XmlDocument. For more info see the Composite design pattern. The CompositeNode class: - Provides access to the child nodes.
- Implements Composite operations such as insert and remove children.
- Provides methods for XPath navigation.
|
Method Summary |
abstract boolean | accept(DocumentVisitor visitor) | → inherited from Node |
|
Accepts a visitor.
|
Node | appendChild(Node newChild) | |
|
Adds the specified node to the end of the list of child nodes for this node.
|
Node | deepClone(boolean isCloneChildren) | |
|
Creates a duplicate of the node.
|
Node | getAncestor(int ancestorType) | → inherited from Node |
|
Gets the first ancestor of the specified NodeType.
|
Node | getAncestor(java.lang.Class ancestorType) | → inherited from Node |
|
Gets the first ancestor of the specified object type.
|
Node | getChild(int nodeType, int index, boolean isDeep) | |
|
Returns an Nth child node that matches the specified type.
|
NodeCollection | getChildNodes(int nodeType, boolean isDeep) | |
|
Returns a live collection of child nodes that match the specified type.
|
NodeCollection | getChildNodes(int nodeType, boolean isDeep, boolean isLive) | |
|
Returns a "live" or "snapshot" collection of child node that match the specified type.
|
java.lang.String | getText() | |
|
Gets the text of this node and of all its children.
|
int | indexOf(Node child) | |
|
Returns the index of the specified child node in the child node array.
|
Node | insertAfter(Node newChild, Node refChild) | |
|
Inserts the specified node immediately after the specified reference node.
|
Node | insertBefore(Node newChild, Node refChild) | |
|
Inserts the specified node immediately before the specified reference node.
|
java.util.Iterator | iterator() | |
|
Provides support for the for each style iteration over the child nodes of this node.
|
Node | nextPreOrder(Node rootNode) | → inherited from Node |
|
Gets next node according to the pre-order tree traversal algorithm.
|
Node | prependChild(Node newChild) | |
|
Adds the specified node to the beginning of the list of child nodes for this node.
|
Node | previousPreOrder(Node rootNode) | → inherited from Node |
|
Gets the previous node according to the pre-order tree traversal algorithm.
|
void | remove() | → inherited from Node |
|
Removes itself from the parent.
|
void | removeAllChildren() | |
|
Removes all the child nodes of the current node.
|
Node | removeChild(Node oldChild) | |
|
Removes the specified child node.
|
NodeList | selectNodes(java.lang.String xpath) | |
|
Selects a list of nodes matching the XPath expression.
|
Node | selectSingleNode(java.lang.String xpath) | |
|
Selects the first Node that matches the XPath expression.
|
java.lang.String | toTxt() | | |