In one of my requirement I had to parse XML and find node values.
My XML looks as below
<NS1:Envelope xmlns:NS1=“http://schemas.xmlsoap.org/soap/envelope/“>
<QueryBalanceResult>
<NS1:AvailableCredit>17400</NS1:AvailableCredit>
</QueryBalanceResult>
</NS1:Envelope>
Since the XML has got namespaces I need to exclude namespaces before I find the node.
Below is the logic to exclude namespaces
var xmlWithNamespaces={Your xml with namespaces};
var xmlWithNoNamespaces= xmlWithNamespaces.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g, “<$1$3>”);
🙂

![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)
![[Step by Step] Configure and run 'Pipelines in Power Platform'](https://rajeevpentyala.com/wp-content/uploads/2024/08/image.png)
Leave a comment