diff --git a/docxtpl/template.py b/docxtpl/template.py index b421e64..20bfb4d 100644 --- a/docxtpl/template.py +++ b/docxtpl/template.py @@ -359,7 +359,7 @@ def render_footnotes( for k, v in self.docx.sections[0].part.related_parts.items(): if v.content_type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml': - import xml.etree.ElementTree as ET + from lxml import etree as ET tree = ET.fromstring(v.blob) for footnote in tree.findall('.//w:t', docx.oxml.ns.nsmap): if hasattr(footnote, 'text'):