|
Groovy 1.7.0 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.xml.MarkupBuilderHelper
class MarkupBuilderHelper extends Object
A helper class for MarkupBuilder.
| Constructor Summary | |
MarkupBuilderHelper(MarkupBuilder builder)
|
|
| Method Summary | |
|---|---|
void
|
comment(String value)
Produce a comment in the output. |
void
|
pi(Map args)
Produce an XML processing instruction in the output. |
void
|
xmlDeclaration(Map args)
Produce an XML declaration in the output. |
void
|
yield(Object value)
Prints data in the body of the current tag, escaping XML entities. |
void
|
yield(String value)
Prints data in the body of the current tag, escaping XML entities. |
void
|
yieldUnescaped(Object value)
Print data in the body of the current tag. |
void
|
yieldUnescaped(String value)
Print data in the body of the current tag. |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
| Constructor Detail |
|---|
public MarkupBuilderHelper(MarkupBuilder builder)
| Method Detail |
|---|
public void comment(String value)
mkp.comment 'string' is equivalent to
mkp.yieldUnescaped '<!-- string -->'.
To create an element with the name 'comment', you need
to supply empty attributes, e.g.:
comment('hello1')
or
mkp.comment('hello1')
will produce:
<!-- hello1 -->while:
comment('hello2', [:])
will produce:
<comment>hello2</comment>
public void pi(Map args)
mkp.pi("xml-stylesheet":[href:"mystyle.css", type:"text/css"])
public void xmlDeclaration(Map args)
mkp.xmlDeclaration(version:'1.0')
public void yield(Object value)
mkp.yield('5 < 7')
public void yield(String value)
mkp.yield('5 < 7')
public void yieldUnescaped(Object value)
mkp.yieldUnescaped('I am <i>happy</i>!').
public void yieldUnescaped(String value)
mkp.yieldUnescaped('I am <i>happy</i>!').
Copyright © 2003-2009 The Codehaus. All rights reserved.