Skip to content

Document loading/parsing errors #28

Description

@tuxmark5

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions