fork download
  1. import groovy.xml.MarkupBuilder
  2.  
  3. def writer = new StringWriter();
  4. def xml = new MarkupBuilder(writer);
  5.  
  6. println xml.mkp.toString()
  7.  
  8. xml.CalibrationResults() {
  9. Status('Error')
  10. Reason('This is the reason')
  11. }
  12.  
  13. print writer.toString()
Success #stdin #stdout 1.45s 219328KB
stdin
Standard input is empty
stdout
groovy.xml.MarkupBuilderHelper@11ef443
<CalibrationResults>
  <Status>Error</Status>
  <Reason>This is the reason</Reason>
</CalibrationResults>