https://www.npmjs.com/package/xml2js
Input:
<SOAP-ENV:Body xmlns:m = "http://www.xyz.org/quotation">
<m:GetQuotationResponse>
<m:Quotation>Here is the quotation</m:Quotation>
</m:GetQuotationResponse>
</SOAP-ENV:Body>
Output:
{
"result": {
"SOAP-ENV:Body": {
"$": {
"xmlns:m": "http://www.xyz.org/quotation"
},
"m:GetQuotationResponse": [
{
"m:Quotation": ["Here is the quotation"]
}
]
}
}
}
Related:
- https://github.com/scarabaeus/xml2js-test
- https://github.com/scarabaeus/xml-js-test
- https://github.com/scarabaeus/fast-xml-parser-test
Download Stats: