use of org.openxmlformats.schemas.wordprocessingml.x2006.main.FootnotesDocument in project poi by apache.
the class XWPFFootnotes method onDocumentRead.
/**
* Read document
*/
@Override
protected void onDocumentRead() throws IOException {
FootnotesDocument notesDoc;
InputStream is = null;
try {
is = getPackagePart().getInputStream();
notesDoc = FootnotesDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
ctFootnotes = notesDoc.getFootnotes();
} catch (XmlException e) {
throw new POIXMLException();
} finally {
if (is != null) {
is.close();
}
}
// Find our footnotes
for (CTFtnEdn note : ctFootnotes.getFootnoteArray()) {
listFootnote.add(new XWPFFootnote(note, this));
}
}
Aggregations