code: public static String marshal(Node node, String encoding) throws CmsXmlException {
  
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          try {
              OutputFormat format = OutputFormat.createPrettyPrint();
              format.setEncoding(encoding);
              format.setSuppressDeclaration(true);
  
              XMLWriter writer = new XMLWriter(out, format);
              writer.setEscapeText(false);
  
              writer.write(node);
              writer.close();
          } catch (Exception e) {
              throw new CmsXmlException(Messages.get().container(Messages.ERR_MARSHALLING_XML_DOC_0), e);
          }
          return new String(out.toByteArray());
      }
docs: Marshals (writes) an XML node into an output stream using XML pretty-print formatting.<p>
  
  @param node the XML node to marshal
  @param encoding the encoding to use
  
  @return the string with the xml content
  
  @throws CmsXmlException if something goes wrong