I want to print my xml which is coming from an external feed on the console. When I do
log.debug "${xml}"
I get xml values on the console but not the starting and end tags. For example
<fruits>
<fruit1>apple</fruit1>
<fruit2>orange</fruit2>
</fruits>
Just prints appleorange Just the values concatenated one after other. What is the best value to handle it. I tried this http://stackoverflow.com/questions/231677/best-way-to-pretty-print-xml-response-in-grails but I get exception at parseText(). I don't know why, because I think the incoming xml is valid.
Update: The type of variable xml is Groovy's NodeChild.