Public API Changes in Aspose.Note 1.4.0

New Approach to Retrieve OneNote Document Nodes

A new method for getting nodes by type was developed to provide a more flexible approach and avoid type casting. Old sample code (.NET, C#):

C#

 // load OneNote document
 Aspose.Note.Document oneFile = new Aspose.Note.Document(@"Test.one");
 
 // retrieve RichText type nodes
 IList<Node> richTextNodes = oneFile.GetChildNodes(Aspose.Note.NodeType.RichText);
 
 // retrieve a particular node from the collection
 Aspose.Note.RichText firstTextNode = (Aspose.Note.RichText)richTextNodes[0];

New sample code (.NET, C#):

C#

 // load OneNote document
 Aspose.Note.Document oneFile = new Aspose.Note.Document(@"Test.one");
 
 // retrieve RichText type nodes
 IList<RichText> richTextNodes = oneFile.GetChildNodes<RichText>();
 
 // retrieve a particular node from the collection
 Aspose.Note.RichText firstTextNode = richTextNodes[0];