Reputation: 835
Here is what I've got.
The questions I think I have are:
I appreciate your time :)
Upvotes: 0
Views: 1944
Reputation: 835
This sample does the trick.
def writer = new StringWriter()
def xml = new groovy.xml.MarkupBuilder(writer)
def propertyUrl = testRunner.testCase.getPropertyValue("url")
xml.records() {
car(name: 'HSV Maloo', make: 'Holden', year: 2006) {
country('Australia')
record(type: 'speed', propertyUrl)
}
car(name: 'Royale', make: 'Bugatti', year: 1931) {
country('France')
record(type: 'price', 'Most Valuable Car at $15 million')
}
}
def records = new XmlSlurper().parseText(writer.toString())
xmlString = writer.toString()
log.info(xmlString)
xmlBase64 = xmlString.bytes.encodeBase64()
log.info(xmlBase64);
A couple things stumped me initially
After that, it was a piece of cake :)
Upvotes: 3