...
| Code Block |
|---|
// require(groupId:'com.thoughtworks.xstream', artifactId:'xstream', version:'1.3')
import com.thoughtworks.xstream.*
class Staff {
String firstname, lastname, position
}
def xstream = new XStream()
xstream.classLoader = getClass().classLoader
def john = new Staff(firstname:'John',
lastname:'Connor',
position:'Resistance Leader')
println xstream.toXML(john)
|
...