JWord > Tutorial > Get all content elements

The example shows you how to use method getContentElements. The getContentElements method recursively retrieves all elements contained inside content of one element. All classes implement the IContentElement (like WordDocument, Paragraph, Run, Text, Table, ...) have getContentElements method. It is different than getContent method. The getContent method returns "first level" elements. In this example we retrieve all hyperlinks from a document.