Hello,
Sorry that HTML doesn't use the required syntaxis. This is the included sample:
<phpdocx_footnote>
<p>Here comes the </p>
<phpdocx_footnote_textdocument data-text=" endnote" data-bold="true" />
<phpdocx_footnote_textfootnote>
<p>Text <em>footnote</em></p>
</phpdocx_footnote_textfootnote>
<p> and some other text.</p>
</phpdocx_footnote>
As you can check, the contents and tags are in the phpdocx_footnote, and there's no wrapping paragraph (p) tag. Your HTML has contents out of phpdocx_footnote and has a wrapping paragraph, and phpdocx_footnote_textdocument should have a data-text value.
Regards.