, ""
Got the previous answer on using xmlparser. But we have a restriction on the use of xmlslurper, how can we fix it (or remove it) using xmlslurper?
Our great code snippet
def xmlFromFile = new File(xxx.xml)
def envelopeNode = new XmlSlurper( false, false ).parseText(xmlFromFile.getText())
def newNode = new XmlSlurper().parseText(SomeStringWithProperXMLChildNode)
envelopeNode.rows.appendNode(newNode)
XmlUtil xmlUtil = new XmlUtil()
xmlUtil.serialize(envelopeNode, new FileWriter(xmlFromFile))
XML snippet:
<SomeThing xmlns="http://xmlns.oracle.com/something" name="something">
<description />
<columns>
<column name="name" />
<column name="Type" />
<column name="Identifier" />
</columns>
<rows>
<row>
<cell>111</cell>
<cell>222</cell>
<cell>333</cell>
</row>
<row>
<cell>444</cell>
<cell>555</cell>
<cell>666</cell>
</row>
</rows>
</SomeThing>
How can I remove the "" or can stop serialize / XmlSlurper from adding this extra encoding information.
thank
source
share