Package org.xwiki.tool.xar
Class XWikiXMLWriter
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.dom4j.io.XMLWriter
org.xwiki.tool.xar.XWikiXMLWriter
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
,XMLFilter
,XMLReader
public class XWikiXMLWriter
extends org.dom4j.io.XMLWriter
Custom XML Writer to support XWiki's code style for XAR XML files.
- Since:
- 4.0M2
- Version:
- $Id: d96daa8eefc78f18b09c46e8d0d82e5aab299df6 $
-
Field Summary
Fields inherited from class org.dom4j.io.XMLWriter
DEFAULT_FORMAT, lastOutputNodeType, LEXICAL_HANDLER_NAMES, preserve, writer
-
Constructor Summary
ConstructorDescriptionXWikiXMLWriter
(OutputStream output) XWikiXMLWriter
(OutputStream output, org.dom4j.io.OutputFormat format) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setVersion
(String xmlVersion) protected void
writeComment
(String text) protected void
protected void
writeNodeText
(org.dom4j.Node node) protected void
Methods inherited from class org.dom4j.io.XMLWriter
characters, close, comment, createWriter, defaultMaximumAllowedCharacter, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, escapeAttributeEntities, escapeElementEntities, flush, getLexicalHandler, getMaximumAllowedCharacter, getOutputFormat, getProperty, handleException, ignorableWhitespace, indent, installLexicalHandler, isElementSpacePreserved, isEscapeText, isExpandEmptyElements, isNamespaceDeclaration, notationDecl, parse, println, processingInstruction, resolveEntityRefs, setDocumentLocator, setEscapeText, setIndentLevel, setLexicalHandler, setMaximumAllowedCharacter, setOutputStream, setProperty, setResolveEntityRefs, setWriter, shouldEncodeChar, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, unparsedEntityDecl, write, write, write, write, write, write, write, write, write, write, write, write, write, writeAttribute, writeAttribute, writeAttribute, writeAttributes, writeAttributes, writeCDATA, writeClose, writeClose, writeDocType, writeDocType, writeElement, writeElementContent, writeEmptyElementClose, writeEntity, writeEntityRef, writeEscapeAttributeEntities, writeNamespace, writeNamespace, writeNamespaces, writeNamespaces, writeNode, writeOpen, writeProcessingInstruction, writeString
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, parse, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XWikiXMLWriter
- Parameters:
output
- the stream where to write the XML- Throws:
UnsupportedEncodingException
- in case encoding issue
-
XWikiXMLWriter
public XWikiXMLWriter(OutputStream output, org.dom4j.io.OutputFormat format) throws UnsupportedEncodingException - Parameters:
output
- the stream where to write the XMLformat
- the style to use when outputting the XML- Throws:
UnsupportedEncodingException
- in case encoding issue
-
-
Method Details
-
setVersion
- Parameters:
xmlVersion
- the XML version to set in the declaration- Since:
- 9.11.1, 10.0
-
writeComment
- Overrides:
writeComment
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writeNodeText
- Overrides:
writeNodeText
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writePrintln
- Overrides:
writePrintln
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writeDeclaration
- Overrides:
writeDeclaration
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-