当我尝试使用 groovy 生成 html 时,我得到了这个额外的值,下面是我的代码和输出
代码:
import groovy.xml.MarkupBuilder
println("let us try a HTML page..\n")
def mkp= new MarkupBuilder()
mkp.html{head{ title "bijoy's groovy"
body{
div{style:"color:red"}
{p "this is cool"}
}}}
并且输出有 grrovyTest$_run_closure1_closure3_closure4_closure5@4d1abd 作为额外的..我该如何删除它?
<html>
<head>
<title>bijoy's groovy</title>
<body>
<div>grrovyTest$_run_closure1_closure3_closure4_closure5@4d1abd
<p>this is cool</p>
</div>
</body>
</head>
</html>