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 $
-
-
Constructor Summary
Constructors Constructor Description XWikiXMLWriter(OutputStream output)
XWikiXMLWriter(OutputStream output, org.dom4j.io.OutputFormat format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setVersion(String xmlVersion)
protected void
writeComment(String text)
protected void
writeDeclaration()
protected void
writeNodeText(org.dom4j.Node node)
protected void
writePrintln()
-
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, 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
-
-
-
-
Constructor Detail
-
XWikiXMLWriter
public XWikiXMLWriter(OutputStream output) throws UnsupportedEncodingException
- 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 Detail
-
setVersion
public void setVersion(String xmlVersion)
- Parameters:
xmlVersion
- the XML version to set in the declaration- Since:
- 9.11.1, 10.0
-
writeComment
protected void writeComment(String text) throws IOException
- Overrides:
writeComment
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writeNodeText
protected void writeNodeText(org.dom4j.Node node) throws IOException
- Overrides:
writeNodeText
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writePrintln
protected void writePrintln() throws IOException
- Overrides:
writePrintln
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
writeDeclaration
protected void writeDeclaration() throws IOException
- Overrides:
writeDeclaration
in classorg.dom4j.io.XMLWriter
- Throws:
IOException
-
-