CompositeNodeHasChildNodes Property

Returns true if this node has any child nodes.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.7.0


public bool HasChildNodes { get; }

Property Value

Type: Boolean


Shows how to combine the rows from two tables into one.
Document doc = new Document(MyDir + "Tables.docx");

// Below are two ways of getting a table from a document.
// 1 -  From the "Tables" collection of a Body node:
Table firstTable = doc.FirstSection.Body.Tables[0];

// 2 -  Using the "GetChild" method:
Table secondTable = (Table)doc.GetChild(NodeType.Table, 1, true);

// Append all rows from the current table to the next.
while (secondTable.HasChildNodes)

// Remove the empty table container.

doc.Save(ArtifactsDir + "Table.CombineTables.docx");

ExpandedSee Also