How we can read the data from XML format

Xml code =

<Response><Status>Success</Status><Message>Completed successfully</Message></Response>

                       let requestBody = <Response><Status>Success</Status><Message>Completed successfully</Message></Response>
                         var xmlObj1 = xml.Parser.fromString({
                                     text: requestBody
                          });
                          var packmanifest = xml.XPath.select({
                          node: xmlObj1,
                          xpath: 'Response'
                          });
                          var orderNum = packmanifest[0].getElementsByTagName({
                          tagName: 'Message'
                          })[0].textContent
  

Leave a comment

Your email address will not be published. Required fields are marked *