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

    Constructors
    Constructor
    Description
     
    XWikiXMLWriter(OutputStream output, org.dom4j.io.OutputFormat format)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setVersion(String xmlVersion)
     
    protected void
     
    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 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

  • Method Details

    • 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 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
    • writeDeclaration

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