public class Body extends Story
To learn more, visit the Aspose.Words Document Object Model (DOM) documentation article.
Body can contain Paragraph and Table child nodes.
Body is a section-level node and can only be a child of Section. There can only be one Body in a Section.
A minimal valid Body needs to contain at least one Paragraph.
| Constructor and Description |
|---|
Body(DocumentBase doc)
Initializes a new instance of the Body class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
void |
ensureMinimum()
If the last child is not a paragraph, creates and appends one empty paragraph.
|
int |
getNodeType()
Returns NodeType.Body.
|
Section |
getParentSection()
Gets the parent section of this story.
|
appendParagraph, deleteShapes, getFirstParagraph, getLastParagraph, getParagraphs, getStoryType, getTablesacceptChildren, 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 Body(DocumentBase doc)
When Body is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Body to a Section use Section.InsertAfter or Section.InsertBefore.
doc - The owner document.public int getNodeType()
getNodeType in class NodeNodeType constants.public Section getParentSection()
ParentSection is equivalent to (Section)ParentNode.
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 void ensureMinimum()