Watch This Video
html.groovy
import groovy.xml.MarkupBuilder
MarkupBuilder builder= new MarkupBuilder()
List courses =[
[id:1, name:'Apache Groovy'],
[id:2, name:'java']
]
builder.html{
head{
title'About Rashmi'
description 'This is an about me page'
keywords'Rashmi ,Groovy, Java'
}
body{
h1'About Me'
p'This is a bunch of text about me........'
section{
h2 'About Me'
table{
tr{
th 'id'
th'name'
}
courses.each {course ->
tr{
td course.id
td course.name
}
}
}
}
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.