public final class Xml2Groovy extends 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() |
String |
parse(File file) |
String |
parse(GPathResult root) |
String |
parse(InputSource source) |
String |
parse(InputStream stream) |
String |
parse(Reader reader) |
String |
parse(String uri) |
String |
parseText(String text) |
public static Xml2Groovy getInstance()
public String parse(InputSource source)
public String parse(InputStream stream)
public String parse(GPathResult root)