-
Notifications
You must be signed in to change notification settings - Fork 5
Use Case: Getting a Single Element
do- edited this page Dec 27, 2021
·
15 revisions
Consider the following XML:
<?xml version="1.0"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SendRequestRequest xmlns="urn://some-schema" xmlns:ns0="urn://another-schema">
<SenderProvidedRequestData Id="Ue7e71ce1-7ce3-4ca5-a689-1a8f2edbb1af">
<MessageID>3931cda8-3245-11ec-b0bc-000c293433a0</MessageID>
<ns0:MessagePrimaryContent>
<ExportDebtRequestsRequest>
<!-- ... and so on ... -->Find the first SenderProvidedRequestData element and get it as a js Object
{SenderProvidedRequestData: {
Id: "Ue7e71ce1-7ce3-4ca5-a689-1a8f2edbb1af",
MessageID: "3931cda8-3245-11ec-b0bc-000c293433a0",
MessagePrimaryContent: {
ExportDebtRequestsRequest: {
// and so on
}
}
}}