public final class Xml2Groovy
extends java.lang.Object
This helper class is useful for translating an XML View definition into a Groovy script that can be handled by an UberBuilder, for example this View
application(title: app.config.application.title, pack: true) { actions { action(id: 'clickAction', name: 'Click', closure: {controller.click(it)}) } gridLayout(cols: 1, rows: 3) textField(id: 'input', text: bind('value', target: model), columns: 20) textField(id: 'output', text: bind{model.value}, columns: 20, editable: false) button(action: clickAction) }
Modifier and Type | Method and Description |
---|---|
static Xml2Groovy |
getInstance() |
java.lang.String |
parse(java.io.File file) |
java.lang.String |
parse(GPathResult root) |
java.lang.String |
parse(org.xml.sax.InputSource source) |
java.lang.String |
parse(java.io.InputStream stream) |
java.lang.String |
parse(java.io.Reader reader) |
java.lang.String |
parse(java.lang.String uri) |
java.lang.String |
parseText(java.lang.String text) |
public static Xml2Groovy getInstance()
public java.lang.String parse(java.io.File file)
public java.lang.String parse(org.xml.sax.InputSource source)
public java.lang.String parse(java.io.InputStream stream)
public java.lang.String parse(java.io.Reader reader)
public java.lang.String parse(java.lang.String uri)
public java.lang.String parse(GPathResult root)
public java.lang.String parseText(java.lang.String text)