Groovy: import standard libraries
Import and use XML parsing
examples/groovy/process_xml.groovy
import groovy.xml.MarkupBuilder def xml = new MarkupBuilder() println(xml)
Date
Some classes are imported by default
examples/groovy/date.groovy
d = new Date() println(d)
See more examples with Groovy Date.
TRUE and FALSE
examples/groovy/bool.groovy
// import Boolean.FALSE // this does not work import static Boolean.FALSE assert !FALSE println(!FALSE)
Check this out also on the Groovy page about structure
Published on 2019-05-07
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post