あなたは中にテキストを包むことができます<![CDATA...]]>:
<instructions size='1'>
   <instruction key='manifest'> 
   <![CDATA[       
       Bundle-SymbolicName: org.slf4j.api&#xA;Bundle-Version: 1.6.4.v20120130-2120 
   ]]>
   </instruction>
</instructions>
次のコードを使用してテストしています。
def out = new StringWriter() 
def xml = new XmlParser().parseText(new File("file.xml").text) 
def printer = new XmlNodePrinter(new PrintWriter(out)) 
printer.print(xml) 
println out.toString() 
出力は期待どおりです。
<instructions size="1">
   <instruction key="manifest">
      Bundle-SymbolicName: org.slf4j.api&#xA;Bundle-Version: 1.6.4.v20120130-2120
   </instruction>
</instructions>
コメントへの回答:
本当に選択の余地がない場合は、拡張してXmlNodePrinter(これはJavaクラスです)、次のようなGroovyコードを作成できます。
class MyXmlNodePrinter extends XmlNodePrinter {
   MyXmlNodePrinter(PrintWriter out) {
      super(out)
   }
   void printSimpleItem(Object value) {
      value = value.replaceAll("\n", "
")
      out.print(value)
   }
}
def out = new StringWriter() 
def xml = new XmlParser().parseText(new File("file.xml").text) 
def printer = new MyXmlNodePrinter(new PrintWriter(out)) 
printer.print(xml) 
println out.toString() 
このコードの出力は次のとおりです。
<instructions size="1">
   <instruction key="manifest">
      Bundle-SymbolicName: org.slf4j.api
Bundle-Version: 1.6.4.v20120130-2120
   </instruction>
</instructions>
これMyXmlNodePrinterは些細なことであり、エスケープを実行しないため、からコピー(および変更)する必要がある場合がありprivate void printEscaped(String s, boolean isAttributeValue)ますXmlNodePrinter。のソースコードはXmlNodePrinterhttps://github.com/groovy/groovy-core/blob/master/subprojects/groovy-xml/src/main/java/groovy/util/XmlNodePrinter.javaにあります。