Skip to content

Instantly share code, notes, and snippets.

@dagvadorj
Created October 26, 2012 09:27
Show Gist options
  • Save dagvadorj/3957831 to your computer and use it in GitHub Desktop.
Save dagvadorj/3957831 to your computer and use it in GitHub Desktop.
Groovy script example
def a = "Dagvadorj"
print a
import java.util.ArrayList
import java.util.List
List b = new ArrayList<String>()
b.add("Copenhagen")
b.add("Hague")
for (c in b) {
println c
}
def students = new XmlParser().parse("D:\\Tax\\students.xml")
students.student.each {
println it.firstName.text()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment