I've been using docx crate in one of my projects for a while and over time I've run into a few documents that fail to load with this crate.
element_end.docx:
Xml(UnexpectedToken { token: "ElementEnd { end: Empty, span: StrSpan(\"/>\" 487..489) }" })
invalid_digit.docx:
Xml(FromStr(ParseIntError { kind: InvalidDigit }))
missing_content.docx:
Xml(MissingField { name: "Hyperlink", field: "content" })
missing_id.docx:
Xml(MissingField { name: "NumberingProperty", field: "id" })
missing_level.docx:
Xml(MissingField { name: "NumberingProperty", field: "level" })
unkown_value_right.docx
Xml(FromStr("Unkown Value. Found right, Expected "start", "end", "center","))
^ Also a typo in the error message (Unkown -> Unknown).
Most of the documents fail to load because of the missing id/level in NumberingProperty and unknown right value. The other errors are quite rare.
I've been using
docxcrate in one of my projects for a while and over time I've run into a few documents that fail to load with this crate.element_end.docx:
Xml(UnexpectedToken { token: "ElementEnd { end: Empty, span: StrSpan(\"/>\" 487..489) }" })invalid_digit.docx:
Xml(FromStr(ParseIntError { kind: InvalidDigit }))missing_content.docx:
Xml(MissingField { name: "Hyperlink", field: "content" })missing_id.docx:
Xml(MissingField { name: "NumberingProperty", field: "id" })missing_level.docx:
Xml(MissingField { name: "NumberingProperty", field: "level" })unkown_value_right.docx
Xml(FromStr("Unkown Value. Foundright, Expected"start", "end", "center","))^ Also a typo in the error message (Unkown -> Unknown).
Most of the documents fail to load because of the missing
id/levelinNumberingPropertyand unknownrightvalue. The other errors are quite rare.