StructuredDocumentTag Class |
Namespace: Aspose.Words.Markup
The StructuredDocumentTag type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | StructuredDocumentTag |
Initializes a new instance of the Structured document tag class.
|
Name | Description | |
---|---|---|
![]() ![]() | BuildingBlockCategory |
Specifies category of building block for this SDT node.
Can not be null.
|
![]() ![]() | BuildingBlockGallery |
Specifies type of building block for this SDT.
Can not be null.
|
![]() ![]() | CalendarType |
Specifies the type of calendar for this SDT.
Default is Default |
![]() ![]() | Checked |
Gets/Sets current state of the Checkbox SDT.
Default value for this property is false.
|
![]() ![]() | ChildNodes |
Gets all immediate child nodes of this node.
(Inherited from CompositeNode.) |
![]() ![]() | Color |
Gets or sets the color of the structured document tag.
|
![]() ![]() | ContentsFont |
Font formatting that will be applied to text entered into SDT.
|
![]() ![]() | Count |
Gets the number of immediate children of this node.
(Inherited from CompositeNode.) |
![]() ![]() | DateDisplayFormat |
String that represents the format in which dates are displayed.
Can not be null.
![]() The dates for English (U.S.) is "mm/dd/yyyy" |
![]() ![]() | DateDisplayLocale |
Allows to set/get the language format for the date displayed in this SDT.
|
![]() ![]() | DateStorageFormat |
Gets/sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document's data store.
Default value is DateTime |
![]() ![]() | Document |
Gets the document to which this node belongs.
(Inherited from Node.) |
![]() ![]() | EndCharacterFont |
Font formatting that will be applied to the last character of text entered into SDT.
|
![]() ![]() | FirstChild |
Gets the first child of the node.
(Inherited from CompositeNode.) |
![]() ![]() | FullDate |
Specifies the full date and time last entered into this SDT.
|
![]() ![]() | HasChildNodes |
Returns true if this node has any child nodes.
(Inherited from CompositeNode.) |
![]() ![]() | Id | Specifies a unique read-only persistent numerical Id for this SDT. |
![]() ![]() | IsComposite |
Returns true as this node can have child nodes.
(Inherited from CompositeNode.) |
![]() ![]() | IsShowingPlaceholderText | Specifies whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT). if set to true, this state shall be resumed (showing placeholder text) upon opening this document. |
![]() ![]() | IsTemporary |
Specifies whether this SDT shall be removed from the WordPprocessingML document when its contents
are modified.
|
![]() ![]() | LastChild |
Gets the last child of the node.
(Inherited from CompositeNode.) |
![]() ![]() | Level |
Gets the level at which this SDT occurs in the document tree.
|
![]() ![]() | ListItems |
Gets SdtListItemCollection associated with this SDT.
|
![]() ![]() | LockContentControl |
When set to true, this property will prohibit a user from deleting this SDT.
|
![]() ![]() | LockContents |
When set to true, this property will prohibit a user from editing the contents of this SDT.
|
![]() ![]() | Multiline |
Specifies whether this SDT allows multiple lines of text.
|
![]() ![]() | NextSibling |
Gets the node immediately following this node.
(Inherited from Node.) |
![]() ![]() | NodeType |
Returns NodeType.StructuredDocumentTag.
(Overrides NodeNodeType.) |
![]() ![]() | ParentNode |
Gets the immediate parent of this node.
(Inherited from Node.) |
![]() ![]() | Placeholder |
Gets the BuildingBlock containing placeholder text which should be displayed when this SDT run contents are empty,
the associated mapped XML element is empty as specified via the XmlMapping element
or the IsShowingPlaceholderText element is true.
|
![]() ![]() | PlaceholderName | Gets or sets Name of the BuildingBlock containing placeholder text. BuildingBlock with this name Name has to be present in the GlossaryDocument otherwise InvalidOperationException will occur. |
![]() ![]() | PreviousSibling |
Gets the node immediately preceding this node.
(Inherited from Node.) |
![]() ![]() | Range |
Returns a Range object that represents the portion of a document that is contained in this node.
(Inherited from Node.) |
![]() ![]() | SdtType |
Gets type of this Structured document tag.
|
![]() ![]() | Style |
Gets or sets the Style of the structured document tag.
|
![]() ![]() | StyleName |
Gets or sets the name of the style applied to the structured document tag.
|
![]() ![]() | Tag |
Specifies a tag associated with the current SDT node.
Can not be null.
|
![]() ![]() | Title |
Specifies the friendly name associated with this SDT.
Can not be null.
|
![]() ![]() | XmlMapping |
Gets an object that represents the mapping of this structured document tag to XML data
in a custom XML part of the current document.
|
Name | Description | |
---|---|---|
![]() ![]() | Accept |
Accepts a visitor.
(Overrides NodeAccept(DocumentVisitor).) |
![]() ![]() | AppendChild |
Adds the specified node to the end of the list of child nodes for this node.
(Inherited from CompositeNode.) |
![]() ![]() | Clear |
Clears contents of this structured document tag and displays a placeholder if it is defined.
|
![]() ![]() | Clone | (Inherited from Node.) |
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetAncestor(Type) |
Gets the first ancestor of the specified object type.
(Inherited from Node.) |
![]() ![]() | GetAncestor(NodeType) |
Gets the first ancestor of the specified NodeType.
(Inherited from Node.) |
![]() ![]() | GetChild |
Returns an Nth child node that matches the specified type.
(Inherited from CompositeNode.) |
![]() ![]() | GetChildNodes |
Returns a live collection of child nodes that match the specified type.
(Inherited from CompositeNode.) |
![]() ![]() | GetEnumerator |
Provides support for the for each style iteration over the child nodes of this node.
(Inherited from CompositeNode.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() ![]() | GetText |
Gets the text of this node and of all its children.
(Inherited from CompositeNode.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | IndexOf |
Returns the index of the specified child node in the child node array.
(Inherited from CompositeNode.) |
![]() ![]() | InsertAfter |
Inserts the specified node immediately after the specified reference node.
(Inherited from CompositeNode.) |
![]() ![]() | InsertBefore |
Inserts the specified node immediately before the specified reference node.
(Inherited from CompositeNode.) |
![]() ![]() | NextPreOrder |
Gets next node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | PrependChild |
Adds the specified node to the beginning of the list of child nodes for this node.
(Inherited from CompositeNode.) |
![]() ![]() | PreviousPreOrder |
Gets the previous node according to the pre-order tree traversal algorithm.
(Inherited from Node.) |
![]() ![]() | Remove |
Removes itself from the parent.
(Inherited from Node.) |
![]() ![]() | RemoveAllChildren |
Removes all the child nodes of the current node.
(Inherited from CompositeNode.) |
![]() ![]() | RemoveChild |
Removes the specified child node.
(Inherited from CompositeNode.) |
![]() ![]() | RemoveSelfOnly |
Removes just this SDT node itself, but keeps the content of it inside the document tree.
|
![]() ![]() | RemoveSmartTags |
Removes all SmartTag descendant nodes of the current node.
(Inherited from CompositeNode.) |
![]() ![]() | SelectNodes |
Selects a list of nodes matching the XPath expression.
(Inherited from CompositeNode.) |
![]() ![]() | SelectSingleNode |
Selects the first Node that matches the XPath expression.
(Inherited from CompositeNode.) |
![]() | ToString | (Inherited from Object.) |
![]() ![]() | ToString(SaveFormat) |
Exports the content of the node into a string in the specified format.
(Inherited from Node.) |
![]() ![]() | ToString(SaveOptions) |
Exports the content of the node into a string using the specified save options.
(Inherited from Node.) |
Structured document tags (SDTs) allow to embed customer-defined semantics as well as its behavior and appearance into a document.
In this version Aspose.Words provides a number of public methods and properties to manipulate the behavior and content of StructuredDocumentTag. Mapping of SDT nodes to custom XML packages within a document can be performed with using the XmlMapping property.
StructuredDocumentTag can occur in a document in the following places:
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Get specific style from the document to apply it to an SDT Style quoteStyle = doc.Styles[StyleIdentifier.Quote]; StructuredDocumentTag sdtPlainText = new StructuredDocumentTag(doc, SdtType.PlainText, MarkupLevel.Inline); sdtPlainText.Style = quoteStyle; StructuredDocumentTag sdtRichText = new StructuredDocumentTag(doc, SdtType.RichText, MarkupLevel.Inline); // Second method to apply specific style to an SDT control sdtRichText.StyleName = "Quote"; // Insert content controls into the document builder.InsertNode(sdtPlainText); builder.InsertNode(sdtRichText); MemoryStream dstStream = new MemoryStream(); doc.Save(dstStream, SaveFormat.Docx); // We can get a collection of StructuredDocumentTags by looking for the document's child nodes of this NodeType Assert.AreEqual(NodeType.StructuredDocumentTag, sdtPlainText.NodeType); NodeCollection tags = doc.GetChildNodes(NodeType.StructuredDocumentTag, true); foreach (Node node in tags) { StructuredDocumentTag sdt = (StructuredDocumentTag) node; // If style was not defined before, style should be "Default Paragraph Font" Assert.AreEqual(StyleIdentifier.Quote, sdt.Style.StyleIdentifier); Assert.AreEqual("Quote", sdt.StyleName); }