|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.util.BuilderSupport
groovy.xml.MarkupBuilder
A helper class for creating XML or HTML markup
Constructor Summary | |
MarkupBuilder()
|
|
MarkupBuilder(IndentPrinter out)
|
|
MarkupBuilder(PrintWriter writer)
|
|
MarkupBuilder(Writer writer)
|
Method Summary | |
protected Object |
createNode(Object name)
|
protected Object |
createNode(Object name,
Map attributes)
|
protected Object |
createNode(Object name,
Map attributes,
Object value)
|
protected Object |
createNode(Object name,
Object value)
|
boolean |
getDoubleQuotes()
Returns true if attribute values are output with
double quotes; false if single quotes are used. |
protected Object |
getName(String methodName)
A hook to allow names to be converted into some other object such as a QName in XML or ObjectName in JMX |
protected IndentPrinter |
getPrinter()
|
protected void |
nodeCompleted(Object parent,
Object node)
A hook to allow nodes to be processed once they have had all of their children applied |
protected void |
print(Object node)
|
void |
setDoubleQuotes(boolean useDoubleQuotes)
Sets whether the builder outputs attribute values in double quotes or single quotes. |
protected void |
setParent(Object parent,
Object child)
|
protected String |
transformValue(String value)
Deprecated. |
Methods inherited from class groovy.util.BuilderSupport |
doInvokeMethod, getCurrent, invokeMethod, invokeMethod, setClosureDelegate, setCurrent |
Methods inherited from class groovy.lang.GroovyObjectSupport |
getMetaClass, getProperty, setMetaClass, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MarkupBuilder()
public MarkupBuilder(PrintWriter writer)
public MarkupBuilder(Writer writer)
public MarkupBuilder(IndentPrinter out)
Method Detail |
public boolean getDoubleQuotes()
true
if attribute values are output with
double quotes; false
if single quotes are used.
By default, single quotes are used.
public void setDoubleQuotes(boolean useDoubleQuotes)
useDoubleQuotes
- If this parameter is true
,
double quotes are used; otherwise, single quotes are.protected IndentPrinter getPrinter()
protected void setParent(Object parent, Object child)
setParent
in class BuilderSupport
protected Object createNode(Object name)
createNode
in class BuilderSupport
protected Object createNode(Object name, Object value)
createNode
in class BuilderSupport
protected Object createNode(Object name, Map attributes, Object value)
createNode
in class BuilderSupport
protected Object createNode(Object name, Map attributes)
createNode
in class BuilderSupport
protected void nodeCompleted(Object parent, Object node)
BuilderSupport
nodeCompleted
in class BuilderSupport
protected void print(Object node)
protected Object getName(String methodName)
BuilderSupport
getName
in class BuilderSupport
methodName
- protected String transformValue(String value)
value
- to be searched and replaced for XML special characters.
#escapeXmlValue(String, boolean)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |