We have the same problems solvable with transformion of the xfdf xml with xslt.
An exception is thrown if Tag are selfclosing <tag …/>.
<square style="solid" width="1" color="#FF0000" opacity="1" creationdate="D:20190123132752Z" flags="print" date="D:20190123132752Z" page="0" rect="26.2442,372.744,562.756,464.412" title="" />
With these xml <tag … > it’s okay. The exception always include the next xml-tag.
<square style="solid" width="1" color="#FF0000" opacity="1" creationdate="D:20190123132752Z" flags="print" date="D:20190123132752Z" page="0" rect="26.2442,372.744,562.756,464.412" title="" /></square>
Second there are one special tag generated by the xfdf producer.
<freetext TextColor="#FF0000" style="solid" width="0" opacity="1" creationdate="D:20190123135009Z" flags="print" date="D:20190123135009Z" page="0" rect="150.687,107.75,233.703,153.55" title=""> <defaultstyle>font: Helvetica 16pt;color: #FF0000</defaultstyle> <defaultappearance> 1 0 0 RG 0 0 1 rg /Helv 16 Tf </defaultappearance> <contents>hummel</contents> <apref y="153.55" x="150.687" gennum="0" objnum="261" ></apref> </freetext>
Also it claims about completly unknown xml-tag like ‘apref’
class com.aspose.pdf.internal.ms.System.I0I: Unknown XFDF element 'apref' com.aspose.pdf.XfdfReader.lif(Unknown Source) com.aspose.pdf.FreeTextAnnotation.lif(Unknown Source)
Our xslt transformation now exclude this tags. But it would be better ist the transformation would not be needed and the XML-Parser could be a bit more friendly, like omiting unknown fields.
Thanks