processWordFile method
Function for processing .docx file
Implementation
Future<void> processWordFile(ArchiveFile wordFile, int elementDepth, List<Relationship> relationShips, String wordOutputDirectory,
List<Styles> stylesList, Document wordDocument, String fileType) async {
final fileContent = utf8.decode(wordFile.content);
final document = xml.XmlDocument.parse(fileContent);
var chkBody = document.findAllElements("w:body");
if (chkBody.isNotEmpty) {
for (var childElements in chkBody.first.childElements) {
await processWordElements(childElements, elementDepth, relationShips, wordOutputDirectory, stylesList, wordDocument, fileType);
}
}
}