javax.xml.bind.Element objects to an XML stream. javax.xml.bind.Element instances can be created using the ObjectFactory that
is generated by the JAXB compiler.
org.dom4j.io.XMLWriter , javax.xml.bind.JAXBContext
| Modifier and Type | Field and Description |
|---|---|
| private OutputFormat | |
| private XMLWriter |
| Access | Constructor and Description |
|---|---|
| public | JAXBWriter(String
JAXB context path to be used contextPath)Creates a new JAXBWriter for the given JAXB context path. |
| public | JAXBWriter(String
JAXB context path to be used contextPath, OutputFormat the DOM4J outputFormat)org.to be usedCreates a new JAXBWriter for the given JAXB context path. |
| public | JAXBWriter(String
JAXB context path to be used contextPath, ClassLoader the classloader to be used for loading JAXB classloader)Creates a new JAXBWriter for the given JAXB context path, using the
specified |
| public | JAXBWriter(String
JAXB context path to be used contextPath, ClassLoader the class loader to be used to load JAXB classloader, OutputFormat the DOM4J outputFormat)org.to be usedCreates a new JAXBWriter for the given JAXB context path, using the
specified |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public OutputFormat | Returns: Returns the output format.Returns the OutputFormat that will be used when writing the XML stream. |
| private XMLWriter | |
| public void | setOutput(File
file to write to file)Defines to write the resulting output to the specified |
| public void | setOutput(OutputStream
outputStream to write to. outputStream)Defines to write the resulting output to the specified |
| public void | |
| public void | |
| public void | |
| public void | writeClose(Element
the JAXB element to write jaxbObject)Writes the closing tag of the specified |
| public void | writeCloseElement(Element
the element)org.to writeWrites the closing tag of the specified |
| public void | writeElement(Element
the element)org.to writeWrites the specified |
| public void | writeOpen(Element
the JAXB element to write jaxbObject)Writes the opening tag of the specified |
| public void | writeOpenElement(Element
the element)org.to writeWrites the opening tag of the specified |
| outputFormat | back to summary |
|---|---|
| private OutputFormat outputFormat | |
| xmlWriter | back to summary |
|---|---|
| private XMLWriter xmlWriter | |
| JAXBWriter | back to summary |
|---|---|
| public JAXBWriter(String contextPath) Creates a new JAXBWriter for the given JAXB context path. This is the Java package where JAXB can find the generated XML classes. This package MUST contain jaxb.properties!
| |
| JAXBWriter | back to summary |
|---|---|
| public JAXBWriter(String contextPath, OutputFormat outputFormat) Creates a new JAXBWriter for the given JAXB context path. The specied
| |
| JAXBWriter | back to summary |
|---|---|
| public JAXBWriter(String contextPath, ClassLoader classloader) Creates a new JAXBWriter for the given JAXB context path, using the
specified
| |
| JAXBWriter | back to summary |
|---|---|
| public JAXBWriter(String contextPath, ClassLoader classloader, OutputFormat outputFormat) Creates a new JAXBWriter for the given JAXB context path, using the
specified
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws IOException, SAXException Stop writing the document to the output. This must be done when all other elements are finished.
| |
| getOutputFormat | back to summary |
|---|---|
| public OutputFormat getOutputFormat() Returns the OutputFormat that will be used when writing the XML stream.
| |
| getWriter | back to summary |
|---|---|
| private XMLWriter getWriter() throws IOException | |
| setOutput | back to summary |
|---|---|
| public void setOutput(File file) throws IOException Defines to write the resulting output to the specified
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(OutputStream outputStream) throws IOException Defines to write the resulting output to the specified
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(Writer writer) throws IOException Defines to write the resulting output to the specified
| |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws IOException, SAXException Start a document by writing the initial XML declaration to the output. This must be done prior to writing any other elements.
| |
| write | back to summary |
|---|---|
| public void write(Element jaxbObject) throws IOException, JAXBException Writes the specified
| |
| writeClose | back to summary |
|---|---|
| public void writeClose(Element jaxbObject) throws IOException, JAXBException Writes the closing tag of the specified
| |
| writeCloseElement | back to summary |
|---|---|
| public void writeCloseElement(Element element) throws IOException Writes the closing tag of the specified
| |
| writeElement | back to summary |
|---|---|
| public void writeElement(Element element) throws IOException Writes the specified
| |
| writeOpen | back to summary |
|---|---|
| public void writeOpen(Element jaxbObject) throws IOException, JAXBException Writes the opening tag of the specified
| |
| writeOpenElement | back to summary |
|---|---|
| public void writeOpenElement(Element element) throws IOException Writes the opening tag of the specified
| |