org.xwiki.tool.xar
Class XWikiXMLWriter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by org.dom4j.io.XMLWriter
          extended by 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: 02027173ded1e1106d6f6b01a993073e3fd8be1a $

Field Summary
 
Fields inherited from class org.dom4j.io.XMLWriter
DEFAULT_FORMAT, lastOutputNodeType, LEXICAL_HANDLER_NAMES, preserve, writer
 
Constructor Summary
XWikiXMLWriter(OutputStream output)
           
XWikiXMLWriter(OutputStream output, org.dom4j.io.OutputFormat format)
           
 
Method Summary
protected  void writeComment(String text)
           
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, writeDeclaration, writeDocType, writeDocType, writeElement, writeElementContent, writeEmptyElementClose, writeEntity, writeEntityRef, writeEscapeAttributeEntities, writeNamespace, writeNamespace, 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
 

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 XML
format - the style to use when outputting the XML
Throws:
UnsupportedEncodingException - in case encoding issue
Method Detail

writeComment

protected void writeComment(String text)
                     throws IOException
Overrides:
writeComment in class org.dom4j.io.XMLWriter
Throws:
IOException

writeNodeText

protected void writeNodeText(org.dom4j.Node node)
                      throws IOException
Overrides:
writeNodeText in class org.dom4j.io.XMLWriter
Throws:
IOException

writePrintln

protected void writePrintln()
                     throws IOException
Overrides:
writePrintln in class org.dom4j.io.XMLWriter
Throws:
IOException


Copyright © 2004-2013 XWiki. All Rights Reserved.