Paragraph

Inheritance: java.lang.Object, com.aspose.words.Node, com.aspose.words.CompositeNode

public class Paragraph extends CompositeNode

Represents a paragraph of text.

To learn more, visit the Working with Paragraphs documentation article.

Paragraph is a block-level node and can be a child of classes derived from Story or InlineStory.

Paragraph can contain any number of inline-level nodes and bookmarks.

The complete list of child nodes that can occur inside a paragraph consists of BookmarkStart, BookmarkEnd, FieldStart, FieldSeparator, FieldEnd, FormField, Comment, Footnote, Run, SpecialChar, Shape, GroupShape, SmartTag.

A valid paragraph in Microsoft Word always ends with a paragraph break character and a minimal valid paragraph consists just of a paragraph break. The Paragraph class automatically appends the appropriate paragraph break character at the end and this character is not part of the child nodes of the Paragraph, therefore a Paragraph can be empty.

Do not include the end of paragraph ControlChar.PARAGRAPH_BREAK or end of cell ControlChar.CELL characters inside the text of the paragraph as it might make the paragraph invalid when the document is opened in Microsoft Word.

Constructors

Constructor Description
Paragraph(DocumentBase doc) Initializes a new instance of the Paragraph class.

Methods

Method Description
accept(DocumentVisitor visitor) Accepts a visitor.
appendChild(Node newChild) Adds the specified node to the end of the list of child nodes for this node.
appendField(int fieldType, boolean updateField)
appendField(String fieldCode) Appends a field to this paragraph.
appendField(String fieldCode, String fieldValue) Appends a field to this paragraph.
clearParaAttrs()
clearRunAttrs()
dd()
deepClone(boolean isCloneChildren) Creates a duplicate of the node.
equals(Object arg0)
fetchInheritedParaAttr(int key)
fetchInheritedRunAttr(int key)
fetchParaAttr(int key)
getAncestor(int ancestorType)
getAncestor(Class ancestorType) Gets the first ancestor of the specified object type.
getBreakIsStyleSeparator() True if this paragraph break is a Style Separator.
getChild(int nodeType, int index, boolean isDeep)
getChildNodes() Gets all immediate child nodes of this node.
getChildNodes(int nodeType, boolean isDeep)
getClass()
getContainer()
getCount() Gets the number of immediate children of this node.
getCurrentNode()
getCustomNodeId() Specifies custom node identifier.
getDirectParaAttr(int key)
getDirectParaAttr(int key, int revisionsView)
getDirectRunAttr(int key)
getDirectRunAttr(int key, int revisionsView)
getDocument() Gets the document to which this node belongs.
getEffectiveTabStops() Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists.
getFirstChild() Gets the first child of the node.
getFrameFormat() Provides access to the frame formatting properties.
getLastChild() Gets the last child of the node.
getListFormat() Provides access to the list formatting properties of the paragraph.
getListLabel() Gets a getListLabel() object that provides access to list numbering value and formatting for this paragraph.
getNextMatchingNode(Node curNode)
getNextSibling() Gets the node immediately following this node.
getNodeType() Returns NodeType.PARAGRAPH.
getParagraphBreakFont() Provides access to the font formatting of the paragraph break character.
getParagraphFormat() Provides access to the paragraph formatting properties.
getParentNode() Gets the immediate parent of this node.
getParentSection() Retrieves the parent Section of the paragraph.
getParentStory() Retrieves the parent section-level story that can be Body or HeaderFooter.
getPreviousSibling() Gets the node immediately preceding this node.
getRange() Returns a Range object that represents the portion of a document that is contained in this node.
getRuns() Provides access to the typed collection of pieces of text inside the paragraph.
getText() Gets the text of this paragraph including the end of paragraph character.
hasChildNodes() Returns true if this node has any child nodes.
hashCode()
indexOf(Node child) Returns the index of the specified child node in the child node array.
insertAfter(Node newChild, Node refChild) Inserts the specified node immediately after the specified reference node.
insertBefore(Node newChild, Node refChild) Inserts the specified node immediately before the specified reference node.
insertField(int fieldType, boolean updateField, Node refNode, boolean isAfter)
insertField(String fieldCode, Node refNode, boolean isAfter) Inserts a field into this paragraph.
insertField(String fieldCode, String fieldValue, Node refNode, boolean isAfter) Inserts a field into this paragraph.
isComposite() Returns true as this node can have child nodes.
isDeleteRevision() Returns true if this object was deleted in Microsoft Word while change tracking was enabled.
isEndOfCell() True if this paragraph is the last paragraph in a Cell; false otherwise.
isEndOfDocument() True if this paragraph is the last paragraph in the last section of the document.
isEndOfHeaderFooter() True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise.
isEndOfSection() True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise.
isFormatRevision() Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.
isInCell() True if this paragraph is an immediate child of Cell; false otherwise.
isInsertRevision() Returns true if this object was inserted in Microsoft Word while change tracking was enabled.
isListItem() True when the paragraph is an item in a bulleted or numbered list in original revision.
isMoveFromRevision() Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.
isMoveToRevision() Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.
iterator() Provides support for the for each style iteration over the child nodes of this node.
joinRunsWithSameFormatting() Joins runs with the same formatting in the paragraph.
nextPreOrder(Node rootNode) Gets next node according to the pre-order tree traversal algorithm.
nodeTypeToString(int nodeType)
notify()
notifyAll()
prependChild(Node newChild) Adds the specified node to the beginning of the list of child nodes for this node.
previousPreOrder(Node rootNode) Gets the previous node according to the pre-order tree traversal algorithm.
remove() Removes itself from the parent.
removeAllChildren() Removes all the child nodes of the current node.
removeChild(Node oldChild) Removes the specified child node.
removeMoveRevisions()
removeParaAttr(int key)
removeRunAttr(int key)
removeSmartTags() Removes all SmartTag descendant nodes of the current node.
selectNodes(String xpath) Selects a list of nodes matching the XPath expression.
selectSingleNode(String xpath) Selects the first Node that matches the XPath expression.
setCustomNodeId(int value) Specifies custom node identifier.
setParaAttr(int key, Object value)
setRunAttr(int key, Object value)
toString()
toString(SaveOptions saveOptions) Exports the content of the node into a string using the specified save options.
toString(int saveFormat)
wait()
wait(long arg0)
wait(long arg0, int arg1)

Paragraph(DocumentBase doc)

public Paragraph(DocumentBase doc)

Initializes a new instance of the Paragraph class.

When Paragraph is created, it belongs to the specified document, but is not yet part of the document and Node.getParentNode() is null .

To append Paragraph to the document use CompositeNode.insertAfter(com.aspose.words.Node, com.aspose.words.Node) or CompositeNode.insertBefore(com.aspose.words.Node, com.aspose.words.Node) on the story where you want the paragraph inserted.

Parameters:

Parameter Type Description
doc DocumentBase The owner document.

accept(DocumentVisitor visitor)

public boolean accept(DocumentVisitor visitor)

Accepts a visitor.

Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.

For more info see the Visitor design pattern.

Parameters:

Parameter Type Description
visitor DocumentVisitor The visitor that will visit the nodes.

Returns: boolean - True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes. Calls DocumentVisitor.visitParagraphStart(com.aspose.words.Paragraph), then calls Node.accept(com.aspose.words.DocumentVisitor) for all child nodes of the paragraph and calls DocumentVisitor.visitParagraphEnd(com.aspose.words.Paragraph) at the end.

appendChild(Node newChild)

public Node appendChild(Node newChild)

Adds the specified node to the end of the list of child nodes for this node.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The node to add.

Returns: Node - The node added.

appendField(int fieldType, boolean updateField)

public Field appendField(int fieldType, boolean updateField)

Parameters:

Parameter Type Description
fieldType int
updateField boolean

Returns: Field

appendField(String fieldCode)

public Field appendField(String fieldCode)

Appends a field to this paragraph.

Parameters:

Parameter Type Description
fieldCode java.lang.String The field code to append (without curly braces).

Returns: Field - A Field object that represents the appended field.

appendField(String fieldCode, String fieldValue)

public Field appendField(String fieldCode, String fieldValue)

Appends a field to this paragraph.

Parameters:

Parameter Type Description
fieldCode java.lang.String The field code to append (without curly braces).
fieldValue java.lang.String The field value to append. Pass null for fields that do not have a value.

Returns: Field - A Field object that represents the appended field.

clearParaAttrs()

public void clearParaAttrs()

clearRunAttrs()

public void clearRunAttrs()

dd()

public void dd()

deepClone(boolean isCloneChildren)

public Node deepClone(boolean isCloneChildren)

Creates a duplicate of the node.

This method serves as a copy constructor for nodes. The cloned node has no parent, but belongs to the same document as the original node.

This method always performs a deep copy of the node. The isCloneChildren parameter specifies whether to perform copy all child nodes as well.

Parameters:

Parameter Type Description
isCloneChildren boolean True to recursively clone the subtree under the specified node; false to clone only the node itself.

Returns: Node - The cloned node.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

fetchInheritedParaAttr(int key)

public Object fetchInheritedParaAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

fetchInheritedRunAttr(int key)

public Object fetchInheritedRunAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

fetchParaAttr(int key)

public Object fetchParaAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getAncestor(int ancestorType)

public CompositeNode getAncestor(int ancestorType)

Parameters:

Parameter Type Description
ancestorType int

Returns: CompositeNode

getAncestor(Class ancestorType)

public CompositeNode getAncestor(Class ancestorType)

Gets the first ancestor of the specified object type.

Parameters:

Parameter Type Description
ancestorType java.lang.Class The object type of the ancestor to retrieve.

Returns: CompositeNode - The ancestor of the specified type or null if no ancestor of this type was found.

The ancestor type matches if it is equal to ancestorType or derived from ancestorType .

getBreakIsStyleSeparator()

public boolean getBreakIsStyleSeparator()

True if this paragraph break is a Style Separator. A style separator allows one paragraph to consist of parts that have different paragraph styles.

Returns: boolean - The corresponding boolean value.

getChild(int nodeType, int index, boolean isDeep)

public Node getChild(int nodeType, int index, boolean isDeep)

Parameters:

Parameter Type Description
nodeType int
index int
isDeep boolean

Returns: Node

getChildNodes()

public NodeCollection getChildNodes()

Gets all immediate child nodes of this node.

Note, getChildNodes() is equivalent to calling M:Aspose.Words.CompositeNode.GetChildNodes(Aspose.Words.NodeType,System.Boolean) with arguments ( NodeType.ANY, false ) and creates and returns a new collection every time it is accessed.

If there are no child nodes, this property returns an empty collection.

Returns: NodeCollection - All immediate child nodes of this node.

getChildNodes(int nodeType, boolean isDeep)

public NodeCollection getChildNodes(int nodeType, boolean isDeep)

Parameters:

Parameter Type Description
nodeType int
isDeep boolean

Returns: NodeCollection

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getContainer()

public CompositeNode getContainer()

Returns: CompositeNode

getCount()

public int getCount()

Gets the number of immediate children of this node.

Returns: int - The number of immediate children of this node.

getCurrentNode()

public Node getCurrentNode()

Returns: Node

getCustomNodeId()

public int getCustomNodeId()

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Returns: int - The corresponding int value.

getDirectParaAttr(int key)

public Object getDirectParaAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getDirectParaAttr(int key, int revisionsView)

public Object getDirectParaAttr(int key, int revisionsView)

Parameters:

Parameter Type Description
key int
revisionsView int

Returns: java.lang.Object

getDirectRunAttr(int key)

public Object getDirectRunAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getDirectRunAttr(int key, int revisionsView)

public Object getDirectRunAttr(int key, int revisionsView)

Parameters:

Parameter Type Description
key int
revisionsView int

Returns: java.lang.Object

getDocument()

public DocumentBase getDocument()

Gets the document to which this node belongs.

The node always belongs to a document even if it has just been created and not yet added to the tree, or if it has been removed from the tree.

Returns: DocumentBase - The document to which this node belongs.

getEffectiveTabStops()

public TabStop[] getEffectiveTabStops()

Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists.

Returns: com.aspose.words.TabStop[]

getFirstChild()

public Node getFirstChild()

Gets the first child of the node. If there is no first child node, a null is returned.

Returns: Node - The first child of the node.

getFrameFormat()

public FrameFormat getFrameFormat()

Provides access to the frame formatting properties.

Returns: FrameFormat - The corresponding FrameFormat value.

getLastChild()

public Node getLastChild()

Gets the last child of the node. If there is no last child node, a null is returned.

Returns: Node - The last child of the node.

getListFormat()

public ListFormat getListFormat()

Provides access to the list formatting properties of the paragraph.

Returns: ListFormat - The corresponding ListFormat value.

getListLabel()

public ListLabel getListLabel()

Gets a getListLabel() object that provides access to list numbering value and formatting for this paragraph.

Returns: ListLabel - A getListLabel() object that provides access to list numbering value and formatting for this paragraph.

getNextMatchingNode(Node curNode)

public Node getNextMatchingNode(Node curNode)

Parameters:

Parameter Type Description
curNode Node

Returns: Node

getNextSibling()

public Node getNextSibling()

Gets the node immediately following this node. If there is no next node, a null is returned.

Returns: Node - The node immediately following this node.

getNodeType()

public int getNodeType()

Returns NodeType.PARAGRAPH.

Returns: int - {NodeType.PARAGRAPH. The returned value is one of NodeType constants.

getParagraphBreakFont()

public Font getParagraphBreakFont()

Provides access to the font formatting of the paragraph break character.

Returns: Font - The corresponding Font value.

getParagraphFormat()

public ParagraphFormat getParagraphFormat()

Provides access to the paragraph formatting properties.

Returns: ParagraphFormat - The corresponding ParagraphFormat value.

getParentNode()

public CompositeNode getParentNode()

Gets the immediate parent of this node.

If a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null .

Returns: CompositeNode - The immediate parent of this node.

getParentSection()

public Section getParentSection()

Retrieves the parent Section of the paragraph.

Returns: Section - The corresponding Section value.

getParentStory()

public Story getParentStory()

Retrieves the parent section-level story that can be Body or HeaderFooter.

Returns: Story - The corresponding Story value.

getPreviousSibling()

public Node getPreviousSibling()

Gets the node immediately preceding this node. If there is no preceding node, a null is returned.

Returns: Node - The node immediately preceding this node.

getRange()

public Range getRange()

Returns a Range object that represents the portion of a document that is contained in this node.

Returns: Range - A Range object that represents the portion of a document that is contained in this node.

getRuns()

public RunCollection getRuns()

Provides access to the typed collection of pieces of text inside the paragraph.

Returns: RunCollection - The corresponding RunCollection value.

getText()

public String getText()

Gets the text of this paragraph including the end of paragraph character.

The text of all child nodes is concatenated and the end of paragraph character is appended as follows:

The returned string includes all control and special characters as described in ControlChar.

Returns: java.lang.String

hasChildNodes()

public boolean hasChildNodes()

Returns true if this node has any child nodes.

Returns: boolean - { true if this node has any child nodes.

hashCode()

public native int hashCode()

Returns: int

indexOf(Node child)

public int indexOf(Node child)

Returns the index of the specified child node in the child node array. Returns -1 if the node is not found in the child nodes.

Parameters:

Parameter Type Description
child Node

Returns: int

insertAfter(Node newChild, Node refChild)

public Node insertAfter(Node newChild, Node refChild)

Inserts the specified node immediately after the specified reference node.

If refChild is null , inserts newChild at the beginning of the list of child nodes.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The Node to insert.
refChild Node The Node that is the reference node. The newChild is placed after the refChild .

Returns: Node - The inserted node.

insertBefore(Node newChild, Node refChild)

public Node insertBefore(Node newChild, Node refChild)

Inserts the specified node immediately before the specified reference node.

If refChild is null , inserts newChild at the end of the list of child nodes.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The Node to insert.
refChild Node The Node that is the reference node. The newChild is placed before this node.

Returns: Node - The inserted node.

insertField(int fieldType, boolean updateField, Node refNode, boolean isAfter)

public Field insertField(int fieldType, boolean updateField, Node refNode, boolean isAfter)

Parameters:

Parameter Type Description
fieldType int
updateField boolean
refNode Node
isAfter boolean

Returns: Field

insertField(String fieldCode, Node refNode, boolean isAfter)

public Field insertField(String fieldCode, Node refNode, boolean isAfter)

Inserts a field into this paragraph.

Parameters:

Parameter Type Description
fieldCode java.lang.String The field code to insert (without curly braces).
refNode Node Reference node inside this paragraph (if refNode is null , then appends to the end of the paragraph).
isAfter boolean Whether to insert the field after or before reference node.

Returns: Field - A Field object that represents the inserted field.

insertField(String fieldCode, String fieldValue, Node refNode, boolean isAfter)

public Field insertField(String fieldCode, String fieldValue, Node refNode, boolean isAfter)

Inserts a field into this paragraph.

Parameters:

Parameter Type Description
fieldCode java.lang.String The field code to insert (without curly braces).
fieldValue java.lang.String The field value to insert. Pass null for fields that do not have a value.
refNode Node Reference node inside this paragraph (if refNode is null , then appends to the end of the paragraph).
isAfter boolean Whether to insert the field after or before reference node.

Returns: Field - A Field object that represents the inserted field.

isComposite()

public boolean isComposite()

Returns true as this node can have child nodes.

Returns: boolean - { true as this node can have child nodes.

isDeleteRevision()

public boolean isDeleteRevision()

Returns true if this object was deleted in Microsoft Word while change tracking was enabled.

Returns: boolean - True if this object was deleted in Microsoft Word while change tracking was enabled.

isEndOfCell()

public boolean isEndOfCell()

True if this paragraph is the last paragraph in a Cell; false otherwise.

Returns: boolean - The corresponding boolean value.

isEndOfDocument()

public boolean isEndOfDocument()

True if this paragraph is the last paragraph in the last section of the document.

Returns: boolean - The corresponding boolean value.

isEndOfHeaderFooter()

public boolean isEndOfHeaderFooter()

True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise.

Returns: boolean - The corresponding boolean value.

isEndOfSection()

public boolean isEndOfSection()

True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise.

Returns: boolean - The corresponding boolean value.

isFormatRevision()

public boolean isFormatRevision()

Returns true if formatting of the object was changed in Microsoft Word while change tracking was enabled.

Returns: boolean - True if formatting of the object was changed in Microsoft Word while change tracking was enabled.

isInCell()

public boolean isInCell()

True if this paragraph is an immediate child of Cell; false otherwise.

Returns: boolean - The corresponding boolean value.

isInsertRevision()

public boolean isInsertRevision()

Returns true if this object was inserted in Microsoft Word while change tracking was enabled.

Returns: boolean - True if this object was inserted in Microsoft Word while change tracking was enabled.

isListItem()

public boolean isListItem()

True when the paragraph is an item in a bulleted or numbered list in original revision.

Returns: boolean - The corresponding boolean value.

isMoveFromRevision()

public boolean isMoveFromRevision()

Returns true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.

Returns: boolean - { true if this object was moved (deleted) in Microsoft Word while change tracking was enabled.

isMoveToRevision()

public boolean isMoveToRevision()

Returns true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.

Returns: boolean - { true if this object was moved (inserted) in Microsoft Word while change tracking was enabled.

iterator()

public Iterator iterator()

Provides support for the for each style iteration over the child nodes of this node.

Returns: java.util.Iterator

joinRunsWithSameFormatting()

public int joinRunsWithSameFormatting()

Joins runs with the same formatting in the paragraph.

Returns: int - Number of joins performed. When N adjacent runs are being joined they count as N - 1 joins.

nextPreOrder(Node rootNode)

public Node nextPreOrder(Node rootNode)

Gets next node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Next node in pre-order order. Null if reached the rootNode .

nodeTypeToString(int nodeType)

public static String nodeTypeToString(int nodeType)

Parameters:

Parameter Type Description
nodeType int

Returns: java.lang.String

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

prependChild(Node newChild)

public Node prependChild(Node newChild)

Adds the specified node to the beginning of the list of child nodes for this node.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use M:Aspose.Words.DocumentBase.ImportNode(Aspose.Words.Node,System.Boolean,Aspose.Words.ImportFormatMode) to import the node to the current document. The imported node can then be inserted into the current document.

Parameters:

Parameter Type Description
newChild Node The node to add.

Returns: Node - The node added.

previousPreOrder(Node rootNode)

public Node previousPreOrder(Node rootNode)

Gets the previous node according to the pre-order tree traversal algorithm.

Parameters:

Parameter Type Description
rootNode Node The top node (limit) of traversal.

Returns: Node - Previous node in pre-order order. Null if reached the rootNode .

remove()

public void remove()

Removes itself from the parent.

removeAllChildren()

public void removeAllChildren()

Removes all the child nodes of the current node.

removeChild(Node oldChild)

public Node removeChild(Node oldChild)

Removes the specified child node.

The parent of oldChild is set to null after the node is removed.

Parameters:

Parameter Type Description
oldChild Node The node to remove.

Returns: Node - The removed node.

removeMoveRevisions()

public void removeMoveRevisions()

removeParaAttr(int key)

public void removeParaAttr(int key)

Parameters:

Parameter Type Description
key int

removeRunAttr(int key)

public void removeRunAttr(int key)

Parameters:

Parameter Type Description
key int

removeSmartTags()

public void removeSmartTags()

Removes all SmartTag descendant nodes of the current node. This method does not remove the content of the smart tags.

selectNodes(String xpath)

public NodeList selectNodes(String xpath)

Selects a list of nodes matching the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:

Parameter Type Description
xpath java.lang.String The XPath expression.

Returns: NodeList - A list of nodes matching the XPath query.

selectSingleNode(String xpath)

public Node selectSingleNode(String xpath)

Selects the first Node that matches the XPath expression.

Only expressions with element names are supported at the moment. Expressions that use attribute names are not supported.

Parameters:

Parameter Type Description
xpath java.lang.String The XPath expression.

Returns: Node - The first Node that matches the XPath query or null if no matching node is found.

setCustomNodeId(int value)

public void setCustomNodeId(int value)

Specifies custom node identifier.

Default is zero.

This identifier can be set and used arbitrarily. For example, as a key to get external data.

Important note, specified value is not saved to an output file and exists only during the node lifetime.

Parameters:

Parameter Type Description
value int The corresponding int value.

setParaAttr(int key, Object value)

public void setParaAttr(int key, Object value)

Parameters:

Parameter Type Description
key int
value java.lang.Object

setRunAttr(int key, Object value)

public void setRunAttr(int key, Object value)

Parameters:

Parameter Type Description
key int
value java.lang.Object

toString()

public String toString()

Returns: java.lang.String

toString(SaveOptions saveOptions)

public String toString(SaveOptions saveOptions)

Exports the content of the node into a string using the specified save options.

Parameters:

Parameter Type Description
saveOptions SaveOptions Specifies the options that control how the node is saved.

Returns: java.lang.String - The content of the node in the specified format.

toString(int saveFormat)

public String toString(int saveFormat)

Parameters:

Parameter Type Description
saveFormat int

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int