GitHub

XmlError

API reference for XmlError.

XML could not be decoded or encoded.

  • "Syntax": the input is not well-formed XML or not valid UTF-8, or, with namespaces="strict", not namespace-well-formed.
  • "Unsupported": the input uses a feature this module does not process, such as an entity declared in a DOCTYPE or a byte encoding other than UTF-8.
  • "Limit": the input exceeds max_token_size, max_depth or max_element_size.
  • "InvalidEvent": the events do not form a well-formed document.

Errors from decode and decode_string carry the one-based line and column of the problem, also at the end of message. Columns count UTF-16 code units, and lines end at LF, CR or CRLF.

Attributes

AttributeTypeDescription
kindXmlErrorKind
messagestr
lineint | None = None
columnint | None = None

Functions

__init__

__init__(kind, message, line=None, column=None) -> None
ParameterTypeDescription
kindXmlErrorKind
messagestr
lineint | None = None
columnint | None = None