
Sample:
"<?xml version="1.0" encoding="UTF-8"?>
<Root>
<child>
<c1>123</c1>
<c2>456</c2>
</child>
</Root>"
1 answer
Hi,
Please check below code. you can use read operator
%dw 2.0
output application/json
var inputData=
"<contact-info><name>Tanmay Patil</name><company>TutorialsPoint</company><phone>(011) 123-4567</phone>
</contact-info>"
---
read(inputData,"application/xml")