Accessing XML value in PostgreSQL

1

I need to access the value of the Message tag from the following xml content:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ExecuteResponse xmlns="http://webservice.epharma.com.br/">
<ExecuteResult>
<Epharma xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xsd.epharma.com.br/autorizador">
<Transacao>0830</Transacao>
<CodigoProcessamento>000000</CodigoProcessamento>
<NSUPos>65008</NSUPos>
<CodigoRedePBMS>009</CodigoRedePBMS>
<VersaoLayout>006</VersaoLayout>
<CodigoTerminal>-99999</CodigoTerminal>
<CodigoFarmacia>12345</CodigoFarmacia>
<CodigoResposta>41</CodigoResposta>
<Mensagem>Loja nao associada</Mensagem>
</Epharma>
</ExecuteResult>
</ExecuteResponse>
</soap:Body>
</soap:Envelope>

I'm trying to access using xpath and I'm not getting it.

How can I do this?

Thank you.

    
asked by anonymous 20.12.2018 / 17:09

0 answers