November 2010
1 post
Convert GPathResult to String without tag0
In Groovy, you can use groovy.xml.XmlUtil.serialize(GPathResult node) to convert node to XML String. But sometimes the XML you end up with contains tag0 namespace all over the elements. It happens because the doc contains default namespace with empty prefix, so groovy uses a default prefix which is “tag0”. The XML is still correct but it would be nice to not have to see that crap. To...