on 2022 Sep 07 8:10 AM
Hi,
I have below XML data, I need to remove the xmlns and add indentation to the data. Does anyone, please provide a solution for it?
XML data:
The response should be in the below format:
Thanks,
Vineetha.
Hi Vineetha,
You can replace the namespace with a blank value.
Let me know if the below code works for you.
Thanks
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try This -
def prettyXML = XmlUtil.serialize(xmlString)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.