org.dom4j.io.XMLWriter . Modifications must be provided by org.dom4j.jaxb.JAXBObjectModifier objects, which are called prior to writing
the XML fragment they are registered for.
org.dom4j.io.SAXModifier
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private SAXModifier | |
| private HashMap | |
| private OutputFormat | |
| private boolean | |
| private XMLWriter |
| Access | Constructor and Description |
|---|---|
| public | JAXBModifier(String
JAXB context path to be used contextPath)Creates a new JAXBModifier for the given JAXB context path. |
| public | JAXBModifier(String
JAXB context path to be used contextPath, ClassLoader the classloader to use classloader)Creates a new JAXBModifier for the given JAXB context path, using the
given |
| public | JAXBModifier(String
JAXB context path to be used contextPath, OutputFormat the DOM4J outputFormat)org.to be usedCreates a new JAXBModifier for the given JAXB context path. |
| public | JAXBModifier(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 JAXBModifier for the given JAXB context path, using the
specified |
| Modifier and Type | Method and Description |
|---|---|
| public void | addObjectModifier(String
the element path to listen for path, JAXBObjectModifier the modifier to register mod)Adds the |
| private XMLWriter | |
| private SAXModifier | |
| private XMLWriter | |
| private SAXModifier | |
| public boolean | Returns: Returns true if elements are pruned.Returns true when the modified |
| public Document | Returns: the resulting DOM4J documentthe file to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe file to parse source, Charset the character set to use charset)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe input source to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe inputstream to parse source)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe inputstream to parse source, String the URI of the given inputstream systemId)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe reader to use for parsing r)Parses the specified |
| public Document | Returns: the resulting DOM4J documentthe reader to parse source, String the URI of the given reader systemId)Parses the specified |
| public Document | |
| public Document | |
| public void | removeObjectModifier(String
the xml path to remove the modifier for path)Removes the |
| public void | resetObjectModifiers()
Removes all registered |
| public void | setOutput(File
the file)java.to write toSets the Output to write the (modified) xml document to. |
| public void | setOutput(OutputStream
the outputStream)java.to write toSets the Output to write the (modified) xml document to. |
| public void | setOutput(Writer
the writer)java.to write toSets the Output to write the (modified) xml document to. |
| public void | setPruneElements(boolean
When true, elements will not be kept in memory pruneElements)Define whether the modified |
| modifier | back to summary |
|---|---|
| private SAXModifier modifier | |
| modifiers | back to summary |
|---|---|
| private HashMap<String, JAXBObjectModifier> modifiers | |
| outputFormat | back to summary |
|---|---|
| private OutputFormat outputFormat | |
| pruneElements | back to summary |
|---|---|
| private boolean pruneElements | |
| xmlWriter | back to summary |
|---|---|
| private XMLWriter xmlWriter | |
| JAXBModifier | back to summary |
|---|---|
| public JAXBModifier(String contextPath) Creates a new JAXBModifier 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!
| |
| JAXBModifier | back to summary |
|---|---|
| public JAXBModifier(String contextPath, ClassLoader classloader) Creates a new JAXBModifier for the given JAXB context path, using the
given
| |
| JAXBModifier | back to summary |
|---|---|
| public JAXBModifier(String contextPath, OutputFormat outputFormat) Creates a new JAXBModifier for the given JAXB context path. The specified
| |
| JAXBModifier | back to summary |
|---|---|
| public JAXBModifier(String contextPath, ClassLoader classloader, OutputFormat outputFormat) Creates a new JAXBModifier for the given JAXB context path, using the
specified
| |
| addObjectModifier | back to summary |
|---|---|
| public void addObjectModifier(String path, JAXBObjectModifier mod) Adds the
| |
| createXMLWriter | back to summary |
|---|---|
| private XMLWriter createXMLWriter() throws IOException | |
| getModifier | back to summary |
|---|---|
| private SAXModifier getModifier() | |
| getXMLWriter | back to summary |
|---|---|
| private XMLWriter getXMLWriter() | |
| installModifier | back to summary |
|---|---|
| private SAXModifier installModifier() throws IOException | |
| isPruneElements | back to summary |
|---|---|
| public boolean isPruneElements() Returns true when the modified
| |
| modify | back to summary |
|---|---|
| public Document modify(File source) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(File source, Charset charset) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(InputSource source) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(InputStream source) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(InputStream source, String systemId) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(Reader r) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(Reader source, String systemId) throws DocumentException, IOException Parses the specified
| |
| modify | back to summary |
|---|---|
| public Document modify(String url) throws DocumentException, IOException Parses the the given URL or filename.
| |
| modify | back to summary |
|---|---|
| public Document modify(URL source) throws DocumentException, IOException Parses the the given URL.
| |
| removeObjectModifier | back to summary |
|---|---|
| public void removeObjectModifier(String path) Removes the
| |
| resetObjectModifiers | back to summary |
|---|---|
| public void resetObjectModifiers() Removes all registered | |
| setOutput | back to summary |
|---|---|
| public void setOutput(File file) throws IOException Sets the Output to write the (modified) xml document to.
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(OutputStream outputStream) throws IOException Sets the Output to write the (modified) xml document to.
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(Writer writer) throws IOException Sets the Output to write the (modified) xml document to.
| |
| setPruneElements | back to summary |
|---|---|
| public void setPruneElements(boolean pruneElements) Define whether the modified
| |
| Modifier and Type | Field and Description |
|---|---|
| private JAXBModifier | |
| private JAXBObjectModifier |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Element | modifyElement(Element
org.to be parsedImplements org. |
| jaxbModifier | back to summary |
|---|---|
| private JAXBModifier jaxbModifier | |
| objectModifier | back to summary |
|---|---|
| private JAXBObjectModifier objectModifier | |
| JAXBElementModifier | back to summary |
|---|---|
| public JAXBElementModifier(JAXBModifier jaxbModifier, JAXBObjectModifier objectModifier) | |
| modifyElement | back to summary |
|---|---|
| public Element modifyElement(Element element) throws Exception Implements org. Doc from org. Called by an event based processor when an elements closing tag is
encountered. This method must return the modified version of the provided
| |