- java.lang.Object
-
- org.jooq.util.jaxb.tools.XMLBuilder
-
@Internal public final class XMLBuilder extends Object
Wrapper around aStringBuilder
which can be used to serialize a JAXB-annotated Java object graph to XML. The JAXB objects must however also implement theXMLAppendable
interface for this to work.Use
formatting()
to create an instance producing formatted XML output andnonFormatting()
to produce XML without any formatting whitespace (i.e. everything on one line).- Author:
- Knut Wannheden
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLBuilder
append(String elementName, boolean b)
XMLBuilder
append(String elementName, int i)
XMLBuilder
append(String elementName, Object o)
XMLBuilder
append(String elementName, String s)
XMLBuilder
append(String wrappingElementName, String elementName, List<?> list)
XMLBuilder
append(String elementName, Pattern p)
XMLBuilder
append(String elementName, XMLAppendable appendable)
XMLBuilder
append(XMLAppendable appendable)
void
appendTo(Appendable a)
static XMLBuilder
formatting()
static XMLBuilder
nonFormatting()
String
toString()
-
-
-
Method Detail
-
formatting
public static XMLBuilder formatting()
-
nonFormatting
public static XMLBuilder nonFormatting()
-
append
public XMLBuilder append(XMLAppendable appendable)
-
append
public XMLBuilder append(String elementName, XMLAppendable appendable)
-
append
public XMLBuilder append(String wrappingElementName, String elementName, List<?> list)
-
append
public XMLBuilder append(String elementName, int i)
-
append
public XMLBuilder append(String elementName, boolean b)
-
append
public XMLBuilder append(String elementName, String s)
-
append
public XMLBuilder append(String elementName, Pattern p)
-
append
public XMLBuilder append(String elementName, Object o)
-
appendTo
public void appendTo(Appendable a) throws IOException
- Throws:
IOException
-
-