Package com.sun.xml.txw2
Class TXW
java.lang.Object
com.sun.xml.txw2.TXW
Entry point to TXW.
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TypedXmlWriter>
Tcreate
(Class<T> rootElement, XmlSerializer out) Creates a newTypedXmlWriter
to write a new instance of a document.static <T extends TypedXmlWriter>
Tcreate
(QName tagName, Class<T> rootElement, XmlSerializer out) Creates a newTypedXmlWriter
to write a new instance of a document.
-
Method Details
-
create
Creates a newTypedXmlWriter
to write a new instance of a document.- Parameters:
rootElement
- TheTypedXmlWriter
interface that declares the content model of the root element. This interface must haveXmlElement
annotation on it to designate the tag name of the root element.out
- The target of the writing.
-
create
public static <T extends TypedXmlWriter> T create(QName tagName, Class<T> rootElement, XmlSerializer out) Creates a newTypedXmlWriter
to write a new instance of a document.Similar to the other method, but this version allows the caller to set the tag name at the run-time.
- Parameters:
tagName
- The tag name of the root document.- See Also:
-