Hi I'm using groovy.util.Node to manipulate tree structures and than I store the trees in XML format.
I need some nodes value not to be escaped. Can you help me ? Here's the code : def nodeValue = '<![CDATA[you&me]]>' Node rootNode = new Node(null, 'parent', [:], nodeValue) rootNode.append(new Node(null, 'child', [:], nodeValue)) println groovy.xml.XmlUtil.serialize(rootNode) // & escaped to & def sw = new StringWriter() new XmlNodePrinter(new IndentPrinter(sw, '', false)).print(rootNode) println sw.toString() // & escaped to & And the output: <?xml version="1.0" encoding="UTF-8"?><parent> <![CDATA[you&me]]> <child><![CDATA[you&me]]></child> </parent> <parent><![CDATA[you&me]]><child><![CDATA[you&me]]></child></parent> Thanks, --- Jean-Christophe <http://www.crealead.com>