- java.lang.Object
-
- org.jooq.util.jaxb.tools.XMLBuilder
-
@Internal public final class XMLBuilder extends Object
Wrapper around aStringBuilderwhich can be used to serialize a JAXB-annotated Java object graph to XML. The JAXB objects must however also implement theXMLAppendableinterface 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 XMLBuilderappend(String elementName, boolean b)XMLBuilderappend(String elementName, int i)XMLBuilderappend(String elementName, Object o)XMLBuilderappend(String elementName, String s)XMLBuilderappend(String wrappingElementName, String elementName, List<?> list)XMLBuilderappend(String elementName, Pattern p)XMLBuilderappend(String elementName, XMLAppendable appendable)XMLBuilderappend(XMLAppendable appendable)voidappendTo(Appendable a)static XMLBuilderformatting()static XMLBuildernonFormatting()StringtoString()
-
-
-
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
-
-