Parse camt.05x statement XML
parse_statementParse camt.05x statement XML into structured JSON data with header, accounts, balances, and entries for navigation.
Instructions
Parse an incoming camt.05x statement XML string into structured data.
Use this to turn a raw statement into a navigable dict (header, statements,
accounts, balances, entries). To pull just the flat entry list use
``list_entries``; to only check the document is schema-valid use
``validate_statement``.
Returns the parsed document as a JSON-serialisable dict (group header plus
statements, each with its account, balances, and entries), or an
``{"error": ...}`` payload if the XML cannot be parsed.
Args:
xml: The raw statement XML as a string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The raw camt.05x statement XML document as a string, with its root camt <Document> element. Returned verbatim from the bank; no file path is accepted. |