public class StructuredDocumentTagRangeStart extends Node implements IStructuredDocumentTag, java.lang.Iterable
StructuredDocumentTagRangeEnd.
To learn more, visit the Structured Document Tags or Content Control documentation article.
Remarks:
Can be immediate child of Body node only.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
| Constructor and Description |
|---|
StructuredDocumentTagRangeStart(DocumentBase doc,
int type)
Initializes a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
Node |
appendChild(Node newChild)
Adds the specified node to the end of the stdContent range.
|
int |
getAppearance()
Gets the appearance of the structured document tag.
|
NodeCollection |
getChildNodes(int nodeType,
boolean isDeep) |
java.awt.Color |
getColor()
Gets the color of the structured document tag.
|
int |
getId()
Specifies a unique read-only persistent numerical Id for this structured document tag.
|
Node |
getLastChild()
Gets the last child in the stdContent range.
|
int |
getLevel()
Gets the level at which this structured document tag range start occurs in the document tree.
|
boolean |
getLockContentControl()
When set to
true, this property will prohibit a user from deleting this structured document tag. |
boolean |
getLockContents()
When set to
true, this property will prohibit a user from editing the contents of this structured document tag. |
Node |
getNode()
Returns Node object that implements this interface.
|
int |
getNodeType()
|
BuildingBlock |
getPlaceholder()
Gets the
BuildingBlock containing placeholder text which should be displayed when this structured document tag run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true. |
java.lang.String |
getPlaceholderName()
Gets or sets Name of the
BuildingBlock containing placeholder text. |
StructuredDocumentTagRangeEnd |
getRangeEnd()
Specifies end of range if the
StructuredDocumentTag is a ranged structured document tag. |
int |
getSdtType()
Gets type of this structured document tag.
|
java.lang.String |
getTag()
Specifies a tag associated with the current structured document tag node.
|
java.lang.String |
getTitle()
Specifies the friendly name associated with this structured document tag.
|
java.lang.String |
getWordOpenXML()
Gets a string that represents the XML contained within the node in the
SaveFormat.FLAT_OPC format. |
java.lang.String |
getWordOpenXMLMinimal()
Gets a string that represents the XML contained within the node in the
SaveFormat.FLAT_OPC format. |
XmlMapping |
getXmlMapping()
Gets an object that represents the mapping of this structured document tag range to XML data in a custom XML part of the current document.
|
boolean |
isMultiSection()
Returns true if this instance is a ranged (multi-section) structured document tag.
|
boolean |
isShowingPlaceholderText()
Specifies whether the content of this structured document tag shall be interpreted to contain placeholder text (as opposed to regular text contents within the structured document tag).
|
void |
isShowingPlaceholderText(boolean value)
Specifies whether the content of this structured document tag shall be interpreted to contain placeholder text (as opposed to regular text contents within the structured document tag).
|
java.util.Iterator |
iterator()
Provides support for the for each style iteration over the child nodes of this node.
|
void |
removeAllChildren()
Removes all the nodes between this range start node and the range end node.
|
void |
removeSelfOnly()
Removes this range start and appropriate range end nodes of the structured document tag, but keeps its content inside the document tree.
|
void |
setAppearance(int value)
Sets the appearance of the structured document tag.
|
void |
setColor(java.awt.Color value)
Sets the color of the structured document tag.
|
void |
setLockContentControl(boolean value)
When set to
true, this property will prohibit a user from deleting this structured document tag. |
void |
setLockContents(boolean value)
When set to
true, this property will prohibit a user from editing the contents of this structured document tag. |
void |
setPlaceholderName(java.lang.String value)
Gets or sets Name of the
BuildingBlock containing placeholder text. |
void |
setTag(java.lang.String value)
Specifies a tag associated with the current structured document tag node.
|
void |
setTitle(java.lang.String value)
Specifies the friendly name associated with this structured document tag.
|
deepClone, getAncestor, getAncestor, getCustomNodeId, getDocument, getNextSibling, getParentNode, getPreviousSibling, getRange, getText, isComposite, memberwiseClone, nextPreOrder, nodeTypeToString, previousPreOrder, remove, setCustomNodeId, toString, toString, toString, visitorActionToBoolpublic StructuredDocumentTagRangeStart(DocumentBase doc, int type)
public NodeCollection getChildNodes(int nodeType, boolean isDeep)
getChildNodes in interface IStructuredDocumentTagpublic boolean isMultiSection()
IStructuredDocumentTagExamples:
Shows how to get structured document tag.
Document doc = new Document(getMyDir() + "Structured document tags by id.docx");
// Get the structured document tag by Id.
IStructuredDocumentTag sdt = doc.getRange().getStructuredDocumentTags().getById(1160505028);
System.out.println(sdt.isMultiSection());
System.out.println(sdt.getTitle());
// Get the structured document tag or ranged tag by Title.
sdt = doc.getRange().getStructuredDocumentTags().getByTitle("Alias4");
System.out.println(sdt.getId());
isMultiSection in interface IStructuredDocumentTagpublic Node getNode()
IStructuredDocumentTaggetNode in interface IStructuredDocumentTagpublic int getNodeType()
getNodeType in class NodeNodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START. The returned value is one of NodeType constants.public Node getLastChild()
Remarks:
If there is no last child node, a null is returned.
public int getLevel()
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getLevel in interface IStructuredDocumentTagMarkupLevel constants.public int getSdtType()
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getSdtType in interface IStructuredDocumentTagSdtType constants.public java.awt.Color getColor()
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getColor in interface IStructuredDocumentTagpublic void setColor(java.awt.Color value)
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
setColor in interface IStructuredDocumentTagvalue - The color of the structured document tag.public int getId()
Specifies a unique read-only persistent numerical Id for this structured document tag.
Remarks:
Id attribute shall follow these rules:
Document.deepClone().
DocumentBase.importNode(com.aspose.words.Node, boolean) Id shall be retained if import does not cause conflicts with other structured document tag Ids in the target document.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getId in interface IStructuredDocumentTagint value.public boolean getLockContentControl()
true, this property will prohibit a user from deleting this structured document tag.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getLockContentControl in interface IStructuredDocumentTagboolean value.public void setLockContentControl(boolean value)
true, this property will prohibit a user from deleting this structured document tag.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
setLockContentControl in interface IStructuredDocumentTagvalue - The corresponding boolean value.public boolean getLockContents()
true, this property will prohibit a user from editing the contents of this structured document tag.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getLockContents in interface IStructuredDocumentTagboolean value.public void setLockContents(boolean value)
true, this property will prohibit a user from editing the contents of this structured document tag.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
setLockContents in interface IStructuredDocumentTagvalue - The corresponding boolean value.public boolean isShowingPlaceholderText()
Specifies whether the content of this structured document tag shall be interpreted to contain placeholder text (as opposed to regular text contents within the structured document tag).
if set to true, this state shall be resumed (showing placeholder text) upon opening this document.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
isShowingPlaceholderText in interface IStructuredDocumentTagboolean value.public void isShowingPlaceholderText(boolean value)
Specifies whether the content of this structured document tag shall be interpreted to contain placeholder text (as opposed to regular text contents within the structured document tag).
if set to true, this state shall be resumed (showing placeholder text) upon opening this document.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
isShowingPlaceholderText in interface IStructuredDocumentTagvalue - The corresponding boolean value.public BuildingBlock getPlaceholder()
BuildingBlock containing placeholder text which should be displayed when this structured document tag run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true.
Remarks:
Can be null, meaning that the placeholder is not applicable for this structured document tag.
getPlaceholder in interface IStructuredDocumentTagBuildingBlock containing placeholder text which should be displayed when this structured document tag run contents are empty, the associated mapped XML element is empty as specified via the getXmlMapping() element or the isShowingPlaceholderText() / isShowingPlaceholderText(boolean) element is true.public java.lang.String getPlaceholderName()
Gets or sets Name of the BuildingBlock containing placeholder text.
getPlaceholderName in interface IStructuredDocumentTagString value.java.lang.IllegalStateException - Throw if BuildingBlock with this name BuildingBlock.getName() / BuildingBlock.setName(java.lang.String) is not present in Document.getGlossaryDocument() / Document.setGlossaryDocument(com.aspose.words.GlossaryDocument).
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
public void setPlaceholderName(java.lang.String value)
Gets or sets Name of the BuildingBlock containing placeholder text.
setPlaceholderName in interface IStructuredDocumentTagvalue - The corresponding String value.java.lang.IllegalStateException - Throw if BuildingBlock with this name BuildingBlock.getName() / BuildingBlock.setName(java.lang.String) is not present in Document.getGlossaryDocument() / Document.setGlossaryDocument(com.aspose.words.GlossaryDocument).
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
public java.lang.String getTag()
null.
Remarks:
A tag is an arbitrary string which applications can associate with structured document tag in order to identify it without providing a visible friendly name.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getTag in interface IStructuredDocumentTagString value.public void setTag(java.lang.String value)
null.
Remarks:
A tag is an arbitrary string which applications can associate with structured document tag in order to identify it without providing a visible friendly name.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
setTag in interface IStructuredDocumentTagvalue - The corresponding String value.public java.lang.String getTitle()
null.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getTitle in interface IStructuredDocumentTagString value.public void setTitle(java.lang.String value)
null.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
setTitle in interface IStructuredDocumentTagvalue - The corresponding String value.public java.lang.String getWordOpenXML()
throws java.lang.Exception
SaveFormat.FLAT_OPC format.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
getWordOpenXML in interface IStructuredDocumentTagSaveFormat.FLAT_OPC format.java.lang.Exceptionpublic java.lang.String getWordOpenXMLMinimal()
throws java.lang.Exception
SaveFormat.FLAT_OPC format. Unlike the getWordOpenXML() property, this method generates a stripped-down document that excludes any non-content-related parts.
Examples:
Shows how to get minimal XML contained within the node in the FlatOpc format.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart tag = (StructuredDocumentTagRangeStart) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, true);
Assert.assertTrue(tag.getWordOpenXMLMinimal()
.contains(
"<pkg:part pkg:name=\"/docProps/app.xml\" pkg:contentType=\"application/vnd.openxmlformats-officedocument.extended-properties+xml\">"));
Assert.assertFalse(tag.getWordOpenXMLMinimal().contains("xmlns:w16cid=\"http://schemas.microsoft.com/office/word/2016/wordml/cid\""));
SaveFormat.FLAT_OPC format.java.lang.Exceptionpublic int getAppearance()
Examples:
Shows how to show tag around content.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart tag = (StructuredDocumentTagRangeStart) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, true);
if (tag.getAppearance() == SdtAppearance.HIDDEN)
tag.setAppearance(SdtAppearance.TAGS);
getAppearance in interface IStructuredDocumentTagSdtAppearance constants.public void setAppearance(int value)
Examples:
Shows how to show tag around content.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart tag = (StructuredDocumentTagRangeStart) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, true);
if (tag.getAppearance() == SdtAppearance.HIDDEN)
tag.setAppearance(SdtAppearance.TAGS);
setAppearance in interface IStructuredDocumentTagvalue - The appearance of the structured document tag. The value must be one of SdtAppearance constants.public XmlMapping getXmlMapping()
Remarks:
You can use the XmlMapping.setMapping(com.aspose.words.CustomXmlPart, java.lang.String, java.lang.String) method of this object to map a structured document tag range to XML data.
Examples:
Shows how to set XML mappings for the range start of a structured document tag.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
// Construct an XML part that contains text and add it to the document's CustomXmlPart collection.
String xmlPartId = UUID.randomUUID().toString();
String xmlPartContent = "<root><text>Text element #1</text><text>Text element #2</text></root>";
CustomXmlPart xmlPart = doc.getCustomXmlParts().add(xmlPartId, xmlPartContent);
// Create a structured document tag that will display the contents of our CustomXmlPart in the document.
StructuredDocumentTagRangeStart sdtRangeStart = (StructuredDocumentTagRangeStart) doc.getChild(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, true);
// If we set a mapping for our structured document tag,
// it will only display a portion of the CustomXmlPart that the XPath points to.
// This XPath will point to the contents second "<text>" element of the first "<root>" element of our CustomXmlPart.
sdtRangeStart.getXmlMapping().setMapping(xmlPart, "/root[1]/text[2]", null);
doc.save(getArtifactsDir() + "StructuredDocumentTag.StructuredDocumentTagRangeStartXmlMapping.docx");
getXmlMapping in interface IStructuredDocumentTagpublic boolean accept(DocumentVisitor visitor) throws java.lang.Exception
Remarks:
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.
accept in class Nodevisitor - The visitor that will visit the nodes.DocumentVisitor stopped the operation before visiting all nodes.java.lang.Exceptionpublic StructuredDocumentTagRangeEnd getRangeEnd()
StructuredDocumentTag is a ranged structured document tag. Otherwise returns null.
Examples:
Shows how to get the properties of multi-section structured document tags.
Document doc = new Document(getMyDir() + "Multi-section structured document tags.docx");
StructuredDocumentTagRangeStart rangeStartTag = (StructuredDocumentTagRangeStart) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, true).get(0);
StructuredDocumentTagRangeEnd rangeEndTag = (StructuredDocumentTagRangeEnd) doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, true).get(0);
System.out.println("StructuredDocumentTagRangeStart values:");
System.out.println(MessageFormat.format("\t|Id: {0}", rangeStartTag.getId()));
System.out.println(MessageFormat.format("\t|Title: {0}", rangeStartTag.getTitle()));
System.out.println(MessageFormat.format("\t|PlaceholderName: {0}", rangeStartTag.getPlaceholderName()));
System.out.println(MessageFormat.format("\t|IsShowingPlaceholderText: {0}", rangeStartTag.isShowingPlaceholderText()));
System.out.println(MessageFormat.format("\t|LockContentControl: {0}", rangeStartTag.getLockContentControl()));
System.out.println(MessageFormat.format("\t|LockContents: {0}", rangeStartTag.getLockContents()));
System.out.println(MessageFormat.format("\t|Level: {0}", rangeStartTag.getLevel()));
System.out.println(MessageFormat.format("\t|NodeType: {0}", rangeStartTag.getNodeType()));
System.out.println(MessageFormat.format("\t|RangeEnd: {0}", rangeStartTag.getRangeEnd()));
System.out.println(MessageFormat.format("\t|Color: {0}", rangeStartTag.getColor()));
System.out.println(MessageFormat.format("\t|SdtType: {0}", rangeStartTag.getSdtType()));
System.out.println(MessageFormat.format("\t|FlatOpcContent: {0}", rangeStartTag.getWordOpenXML()));
System.out.println(MessageFormat.format("\t|Tag: {0}\n", rangeStartTag.getTag()));
System.out.println("StructuredDocumentTagRangeEnd values:");
System.out.println("\t|Id: {rangeEndTag.Id}");
System.out.println("\t|NodeType: {rangeEndTag.NodeType}");
StructuredDocumentTagRangeEnd value.public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic Node appendChild(Node newChild)
newChild - The node to add.public void removeAllChildren()
Examples:
Shows how to create/remove structured document tag and its content.
public void sdtRangeExtendedMethods() throws Exception
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("StructuredDocumentTag element");
StructuredDocumentTagRangeStart rangeStart = insertStructuredDocumentTagRanges(doc);
// Removes ranged structured document tag, but keeps content inside.
rangeStart.removeSelfOnly();
rangeStart = (StructuredDocumentTagRangeStart)doc.getChild(
NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, false);
Assert.assertEquals(null, rangeStart);
StructuredDocumentTagRangeEnd rangeEnd = (StructuredDocumentTagRangeEnd)doc.getChild(
NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, 0, false);
Assert.assertEquals(null, rangeEnd);
Assert.assertEquals("StructuredDocumentTag element", doc.getText().trim());
rangeStart = insertStructuredDocumentTagRanges(doc);
Node paragraphNode = rangeStart.getLastChild();
if (paragraphNode != null)
Assert.assertEquals("StructuredDocumentTag element", paragraphNode.getText().trim());
// Removes ranged structured document tag and content inside.
rangeStart.removeAllChildren();
paragraphNode = rangeStart.getLastChild();
Assert.assertEquals("", paragraphNode.getText());
}public void removeSelfOnly()
Examples:
Shows how to create/remove structured document tag and its content.
public void sdtRangeExtendedMethods() throws Exception
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("StructuredDocumentTag element");
StructuredDocumentTagRangeStart rangeStart = insertStructuredDocumentTagRanges(doc);
// Removes ranged structured document tag, but keeps content inside.
rangeStart.removeSelfOnly();
rangeStart = (StructuredDocumentTagRangeStart)doc.getChild(
NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, 0, false);
Assert.assertEquals(null, rangeStart);
StructuredDocumentTagRangeEnd rangeEnd = (StructuredDocumentTagRangeEnd)doc.getChild(
NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, 0, false);
Assert.assertEquals(null, rangeEnd);
Assert.assertEquals("StructuredDocumentTag element", doc.getText().trim());
rangeStart = insertStructuredDocumentTagRanges(doc);
Node paragraphNode = rangeStart.getLastChild();
if (paragraphNode != null)
Assert.assertEquals("StructuredDocumentTag element", paragraphNode.getText().trim());
// Removes ranged structured document tag and content inside.
rangeStart.removeAllChildren();
paragraphNode = rangeStart.getLastChild();
Assert.assertEquals("", paragraphNode.getText());
}removeSelfOnly in interface IStructuredDocumentTag