def xmlRequest = new groovy.xml.MarkupBuilder() xmlRequest.mkp.xmlDeclaration(version: "1.0", encoding: "utf-8") xmlRequest."_-bbc"(xmlns:"urn:xyz.com"){ I_A('step.x would go here') I_B('step.y would go here') }