I have a table which has a column xml_payload. It has below data.
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.08">
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<MsgId>XX2023050820230508USIn00063461</MsgId>
<CreDtTm>2023-05-08T12:14:49.358Z</CreDtTm>
</GrpHdr>
</BkToCstmrDbtCdtNtfctn>
</Document>
How I redrive CreDtTm node value using pgsql?
SELECT unnest(xpath('./BkToCstmrDbtCdtNtfctn/GrpHdr/CreDtTm/text()', xml_payload))
from wire.stages