1.설치 및 다큐~
http://groovy.codehaus.org/Tutorial+2+-+Code+as+data%2C+or+closures
2.간단한 테스트
amPM = Calendar.getInstance().get(Calendar.AM_PM)
if (amPM == Calendar.AM)
{
println("Good morning")
} else {
println("Good evening")
}
3.File
def number=0
new File('c:/tmp/sakura.vbs').eachLine{
line ->
number++
println "$number: $line"
}
4.XML
def users = new XmlSlurper().parse(new File('d:/temp/test.xml'))
for( user in users.user ){
println "${user.id.@index } : ${user.id }"
}


댓글 없음:
댓글 쓰기