Index: src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java
===================================================================
--- src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java	(revision 25374)
+++ src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java	(working copy)
@@ -24,6 +24,7 @@
 import java.util.Map;
 
 import org.dom4j.Element;
+import org.dom4j.io.OutputFormat;
 import org.dom4j.io.XMLWriter;
 import org.dom4j.tree.DefaultComment;
 import org.dom4j.tree.DefaultElement;
@@ -54,11 +55,16 @@
     {
         this.wikiWriter = new WikiWriter(printer);
 
-        try {
-            this.xmlWriter = new XHTMLWriter(this.wikiWriter);
-        } catch (UnsupportedEncodingException e) {
-            // TODO: add error log "should not append"
-        }
+        this.xmlWriter = createXMLWriter();
+    }
+
+    protected XMLWriter createXMLWriter()
+    {
+        OutputFormat toto = new OutputFormat();
+        toto.setIndent(true);
+        toto.setNewlines(true);
+        
+        return new XMLWriter(this.wikiWriter, toto);
     }
 
     public XMLWriter getXMLWriter()
Index: src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
===================================================================
--- src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java	(revision 25374)
+++ src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java	(working copy)
@@ -22,7 +22,9 @@
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
+import org.dom4j.io.XMLWriter;
 import org.xml.sax.Attributes;
+import org.xwiki.rendering.internal.renderer.printer.XHTMLWriter;
 
 /**
  * Base toolkit class for all XHTML-based renderers. This printer handles whitespaces so that it prints "&nbsp;" when
@@ -55,6 +57,16 @@
     /**
      * {@inheritDoc}
      * 
+     * @see org.xwiki.rendering.renderer.printer.XMLWikiPrinter#createXMLWriter()
+     */
+    protected XMLWriter createXMLWriter()
+    {
+        return new XHTMLWriter(this.wikiWriter);
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
      * @see org.xwiki.rendering.renderer.printer.XMLWikiPrinter#printXML(java.lang.String)
      */
     @Override
Index: src/main/java/org/xwiki/rendering/internal/renderer/printer/XHTMLWriter.java
===================================================================
--- src/main/java/org/xwiki/rendering/internal/renderer/printer/XHTMLWriter.java	(revision 25374)
+++ src/main/java/org/xwiki/rendering/internal/renderer/printer/XHTMLWriter.java	(working copy)
@@ -19,7 +19,6 @@
  */
 package org.xwiki.rendering.internal.renderer.printer;
 
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 
 import org.dom4j.io.OutputFormat;
@@ -39,7 +38,7 @@
         DEFAULT_XHTML_FORMAT.setXHTML(true);
     }
 
-    public XHTMLWriter(Writer writer) throws UnsupportedEncodingException
+    public XHTMLWriter(Writer writer)
     {
         super(writer, DEFAULT_XHTML_FORMAT);
 
Index: src/main/java/org/xwiki/rendering/syntax/Syntax.java
===================================================================
--- src/main/java/org/xwiki/rendering/syntax/Syntax.java	(revision 25374)
+++ src/main/java/org/xwiki/rendering/syntax/Syntax.java	(working copy)
@@ -43,7 +43,7 @@
     public static final Syntax MEDIAWIKI_1_0 = new Syntax(SyntaxType.MEDIAWIKI, "1.0");
     public static final Syntax CONFLUENCE_1_0 = new Syntax(SyntaxType.CONFLUENCE, "1.0");
     public static final Syntax TWIKI_1_0 = new Syntax(SyntaxType.TWIKI, "1.0");
-    public static final Syntax XDOM_1_0 = new Syntax(SyntaxType.XDOM, "1.0");
+    public static final Syntax XML_1_0 = new Syntax(SyntaxType.XML, "1.0");
 
     /**
      * This is HTML with annotations (comments) in order to allow round tripping between for example the WYSIWYG editor
Index: src/main/java/org/xwiki/rendering/syntax/SyntaxType.java
===================================================================
--- src/main/java/org/xwiki/rendering/syntax/SyntaxType.java	(revision 25374)
+++ src/main/java/org/xwiki/rendering/syntax/SyntaxType.java	(working copy)
@@ -47,7 +47,7 @@
 
     public static final SyntaxType EVENT = new SyntaxType("event", "Event");
 
-    public static final SyntaxType XDOM = new SyntaxType("xdom", "XML based xdom");
+    public static final SyntaxType XML = new SyntaxType("xml", "XML based xdom");
 
     public static final SyntaxType TEX = new SyntaxType("tex", "TeX");
 
