Class - Node- NodeCollection


#1

I want to know where we are supposed to use Node, NodeCollection classes with examples. If there is any document providing the details, it will be much useful.


#2

CompositeNode, Node and NodeCollection are base classes for typed nodes - Section, Table, Paragraph, etc. - and their collections. Some methods return them. E.g. SelectSingleNode, GetChildNodes.

Here is an example of how to iterate through all paragraphs in a document setting their LocalId to another value:

NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true);

foreach(Paragraph paragraph in paragraphs)

{

paragraph.Font.LocaleId = 1030;

}

To know more read about Aspose.Words object model in online or HTML Help documentation articles:

http://www.aspose.com/Wiki/default.aspx/Aspose.Words/AboutObjectModel.html

http://www.aspose.com/Wiki/default.aspx/Aspose.Words/ObjectModelHierarchy.html

http://www.aspose.com/Wiki/default.aspx/Aspose.Words/DocumentObjectModelCompositionDiagrams.html