fork download
  1. import groovy.xml.StreamingMarkupBuilder
  2.  
  3. def buildXmlErrorFile(String reason){
  4. def writer = new StringWriter()
  5. def xml = new StreamingMarkupBuilder(writer)
  6. xml.encoding = "UTF-8"
  7. xml.bind{
  8. mkp.xmlDeclaration()
  9. xml.CalibrationResults() {
  10. Status('Error')
  11. Reason(reason)
  12. }
  13. }
  14. print writer.toString()
  15. }
  16.  
  17.  
  18.  
  19. buildXmlErrorFile("test reason as param")
Runtime error #stdin #stdout 1.46s 219008KB
stdin
Standard input is empty
stdout
Standard output is empty