BuildingBlock class

BuildingBlock class

Represents a glossary document entry such as a Building Block, AutoText or an AutoCorrect entry. To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article.

Remarks

BuildingBlock can contain only Section nodes.

BuildingBlock can only be a child of GlossaryDocument.

You can create new building blocks and insert them into a glossary document. You can modify or delete existing building blocks. You can copy or move building blocks between documents. You can insert content of a building block into a document.

Corresponds to the docPart, docPartPr and docPartBody elements in OOXML.

Inheritance: BuildingBlockCompositeNodeNode

Constructors

NameDescription
BuildingBlock(glossary_doc)Initializes a new instance of this class.

Properties

NameDescription
behaviorSpecifies the behavior that shall be applied when the contents of the building block is inserted into the main document.
categorySpecifies the second-level categorization for the building block.
countGets the number of immediate children of this node.
(Inherited from CompositeNode)
custom_node_idSpecifies custom node identifier.
(Inherited from Node)
descriptionGets or sets the description associated with this building block.
documentGets the document to which this node belongs.
(Inherited from Node)
first_childGets the first child of the node.
(Inherited from CompositeNode)
first_sectionGets the first section in the building block.
gallerySpecifies the first-level categorization for the building block for the purposes of classification or user interface sorting.
guidGets or sets an identifier (a 128-bit GUID) that uniquely identifies this building block.
has_child_nodesReturns True if this node has any child nodes.
(Inherited from CompositeNode)
is_compositeReturns True if this node can contain other nodes.
(Inherited from Node)
last_childGets the last child of the node.
(Inherited from CompositeNode)
last_sectionGets the last section in the building block.
nameGets or sets the name of this building block.
next_siblingGets the node immediately following this node.
(Inherited from Node)
node_typeReturns the NodeType.BUILDING_BLOCK value.
parent_nodeGets the immediate parent of this node.
(Inherited from Node)
previous_siblingGets the node immediately preceding this node.
(Inherited from Node)
rangeReturns a Range object that represents the portion of a document that is contained in this node.
(Inherited from Node)
sectionsReturns a collection that represents all sections in the building block.
typeSpecifies the building block type.

Methods

NameDescription
accept(visitor)Accepts a visitor.
accept_end(visitor)Accepts a visitor for visiting the end of the BuildingBlock.
accept_start(visitor)Accepts a visitor for visiting the start of the BuildingBlock.
append_child(new_child)Adds the specified node to the end of the list of child nodes for this node.
(Inherited from CompositeNode)
clone(is_clone_children)Creates a duplicate of the node.
(Inherited from Node)
get_ancestor(ancestor_type)Gets the first ancestor of the specified object type.
(Inherited from Node)
get_ancestor(ancestor_type)Gets the first ancestor of the specified NodeType.
(Inherited from Node)
get_child(node_type, index, is_deep)Returns an Nth child node that matches the specified type.
(Inherited from CompositeNode)
get_child_nodes(node_type, is_deep)Returns a live collection of child nodes that match the specified type.
(Inherited from CompositeNode)
get_text()Gets the text of this node and of all its children.
(Inherited from Node)
index_of(child)Returns the index of the specified child node in the child node array.
(Inherited from CompositeNode)
insert_after(new_child, ref_child)Inserts the specified node immediately after the specified reference node.
(Inherited from CompositeNode)
insert_before(new_child, ref_child)Inserts the specified node immediately before the specified reference node.
(Inherited from CompositeNode)
next_pre_order(root_node)Gets next node according to the pre-order tree traversal algorithm.
(Inherited from Node)
node_type_to_string(node_type)A utility method that converts a node type enum value into a user friendly string.
(Inherited from Node)
prepend_child(new_child)Adds the specified node to the beginning of the list of child nodes for this node.
(Inherited from CompositeNode)
previous_pre_order(root_node)Gets the previous node according to the pre-order tree traversal algorithm.
(Inherited from Node)
remove()Removes itself from the parent.
(Inherited from Node)
remove_all_children()Removes all the child nodes of the current node.
(Inherited from CompositeNode)
remove_child(old_child)Removes the specified child node.
(Inherited from CompositeNode)
remove_smart_tags()Removes all SmartTag descendant nodes of the current node.
(Inherited from CompositeNode)
select_nodes(xpath)Selects a list of nodes matching the XPath expression.
(Inherited from CompositeNode)
select_single_node(xpath)Selects the first Node that matches the XPath expression.
(Inherited from CompositeNode)
to_string(save_format)Exports the content of the node into a string in the specified format.
(Inherited from Node)
to_string(save_options)Exports the content of the node into a string using the specified save options.
(Inherited from Node)

See Also