public class SmartTag extends CompositeNode
To learn more, visit the Structured Document Tags or Content Control documentation article.
Smart tags is a kind of custom XML markup. Smart tags provide a facility for embedding customer-defined semantics into the document via the ability to provide a basic namespace/name for a run or set of runs within a document.
SmartTag can be a child of a Paragraph or another SmartTag node.
The complete list of child nodes that can occur inside a smart tag consists of BookmarkStart, BookmarkEnd, FieldStart, FieldSeparator, FieldEnd, FormField, Comment, Footnote, Run, SpecialChar, Shape, GroupShape, CommentRangeStart, CommentRangeEnd, SmartTag.
| Constructor and Description |
|---|
SmartTag(DocumentBase doc)
Initializes a new instance of the
SmartTag class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
java.lang.String |
getElement()
Specifies the name of the smart tag within the document.
|
int |
getLevel_IMarkupNode() |
int |
getNodeType()
Returns NodeType.SmartTag.
|
CustomXmlPropertyCollection |
getProperties()
A collection of the smart tag properties.
|
java.lang.String |
getUri()
Specifies the namespace URI of the smart tag.
|
void |
setElement(java.lang.String value)
Specifies the name of the smart tag within the document.
|
void |
setUri(java.lang.String value)
Specifies the namespace URI of the smart tag.
|
acceptChildren, acceptCore, appendChild, coreRemoveSelfOnly, getChild, getChildNodes, getChildNodes, getContainer, getCount, getCurrentNode, getFirstChild, getLastChild, getNextMatchingNode, getText, hasChildNodes, indexOf, insertAfter, insertBefore, isComposite, iterator, prependChild, removeAllChildren, removeChild, removeSmartTags, selectNodes, selectSingleNodedd, deepClone, getAncestor, getAncestor, getCustomNodeId, getDocument, getNextSibling, getParentNode, getPreviousSibling, getRange, memberwiseClone, nextPreOrder, nodeTypeToString, previousPreOrder, remove, setCustomNodeId, toString, toString, toString, visitorActionToBoolpublic SmartTag(DocumentBase doc)
SmartTag class.
When you create a new node, you need to specify a document to which the node belongs. A node cannot exist without a document because it depends on the document-wide structures such as lists and styles. Although a node always belongs to a document, a node might or might not be a part of the document tree.
When a node is created, it belongs to a document, but is not yet part of the document tree and Node.getParentNode() is null. To insert a node into the document, use the CompositeNode.insertAfter(com.aspose.words.Node, com.aspose.words.Node) or CompositeNode.insertBefore(com.aspose.words.Node, com.aspose.words.Node) methods on the parent node.
doc - The owner document.public int getNodeType()
getNodeType in class NodeNodeType constants.public boolean accept(DocumentVisitor visitor) throws java.lang.Exception
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.
public java.lang.String getElement()
Cannot be null.
Default is empty string.
String value.public void setElement(java.lang.String value)
Cannot be null.
Default is empty string.
value - The corresponding String value.public java.lang.String getUri()
Cannot be null.
Default is empty string.
String value.public void setUri(java.lang.String value)
Cannot be null.
Default is empty string.
value - The corresponding String value.public CustomXmlPropertyCollection getProperties()
Cannot be null.
CustomXmlPropertyCollection value.public int getLevel_IMarkupNode()