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