I new in Java. I get xml as text from Database. Next I need to get field value from this xml as text How I can do it? I do not understand.
My xml example:
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:">
<GetWlltInf>
<MsgHdr>
<MsgId>123125412</MsgId>
<CreDt>2022-12-28T10:37:45.363Z</CreDt>
<From>
asfaoi232sdianscv
</Fr>
<To>lkmalksnd71t2987hd</To>
<OperationId>a3cf7eb8-372c-4712-82bf-1a926171a701</OperationId>
</MsgHdr>
<Req>
<ReqTp>HSTR</ReqTp>
<Prd>
<FromDateTime>
2022-12-20T16:00:00.000Z
</FrDtTm>
<ToDateTime>
2022-12-22T00:00:00.000Z
</ToDtTm>
</Prd
<ReqCrit>
<Pty>
<Wllt>
<Id>sck12312-asdasd621j23-asdasdgsfg</Id>
</Wllt>
</Pty>
</ReqCrit>
</Req>
</GetWlltInf>
</Document>
I googled different ideas, but wasn't able to understand. And I found a lot of answers on how to do it if you work with xml, but I work with xml as text
Thanks a lot!