Parse inbound ISO 20022 XML
parse_messageClassify an inbound ISO 20022 XML message by identifying its message type, family, version, and Business Application Header before processing. Handles both bare documents and BAH-wrapped envelopes.
Instructions
Parse and classify an inbound ISO 20022 XML message.
Use this on the receiving side to identify what a message is -- its
``msg_def_idr`` (e.g. ``pacs.002.001.10``), family, version, and any
Business Application Header -- before processing it. Handles both bare
``Document`` messages and BAH-wrapped envelopes.
Returns a dict with ``msg_def_idr``, ``msg_family``, ``version``,
``root_local_name``, ``namespace_uri``, ``envelope_wrapped`` and ``bah``.
Args:
xml: The raw inbound XML message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | A raw inbound ISO 20022 XML message (pacs.008 / pacs.002 / pacs.004, optionally BAH-envelope-wrapped) to classify. |