Add XML to content.xml
@param util an util
@param appendable the output
@throws IOException if the XML could not be written
970045
public void appendXMLToContentEntry(final XMLUtil util,
                                        final Appendable appendable) throws IOException {
        this.appendPreamble(util, appendable);
        this.appendRows(util, appendable);
        this.appendPostamble(appendable);
    }
256653
private void writeSimple(String currentIndent, String tagName, StringBuilder attrs, Class<?> declaredType, Object value) throws IOException {
        Class<?> effectiveType;
        if (declaredType == Object.class) {
            Class<?> realType = value.getClass();
            if (realType != String.class) {
                effectiveType = settings.getConverter().findTypedConverter(realType).getEffectiveType();
                String typeStr = SerTypeMapper.encodeType(effectiveType, settings, basePackage, knownTypes);
                appendAttribute(attrs, TYPE, typeStr);
            } else {
                effectiveType = realType;
            }
        } else if (settings.getConverter().isConvertible(declaredType) == false) {
            effectiveType = settings.getConverter().findTypedConverter(value.getClass()).getEffectiveType();
            String typeStr = SerTypeMapper.encodeType(effectiveType, settings, basePackage, knownTypes);
            appendAttribute(attrs, TYPE, typeStr);
        } else {
            effectiveType = declaredType;
        }
        try {
            String converted = settings.getConverter().convertToString(effectiveType, value);
            if (converted == null) {
                throw new IllegalArgumentException("Unable to write because converter returned a null string: " + value);
            }
            output.append(currentIndent).append('<').append(tagName).append(attrs).append('>');
            appendEncoded(converted);
            output.append('<').append('/').append(tagName).append('>').append(settings.getNewLine());
        } catch (RuntimeException ex) {
            throw new IllegalArgumentException("Unable to convert type " + effectiveType.getName() + " declared as " + declaredType.getName(), ex);
        }
    }
394269
public void addPage(String path, ContentElement content) throws IOException {
    String fullPath = buildJcrPathForZip(path) + "/" + DOT_CONTENT_XML;
    Document doc = xmlContentBuilder.buildPage(content);
    writeXmlDocument(fullPath, doc);
  }
790400
public void appendTo(
      Appendable out,
      DependencyInfo info,
      String content) throws IOException {
    appendTo(out, info, CharSource.wrap(content));
  }
398326
@Override
    public Appendable append(CharSequence csq, int start, int end) throws IOException {
        this.loggingWriter.append(csq, start, end);
        return this;
    }
214727
public void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
        this.logger.log(Level.FINER, "Writing odselement: contentElement to zip file");
        this.contentElement.write(xmlUtil, writer);
    }
319079
public static void append(Path self, Object text) throws IOException {
        Writer writer = null;
        try {
            writer = new OutputStreamWriter(Files.newOutputStream(self, CREATE, APPEND), Charset.defaultCharset());
            InvokerHelper.write(writer, text);
            writer.flush();

            Writer temp = writer;
            writer = null;
            temp.close();
        } finally {
            closeWithWarning(writer);
        }
    }
967806
public void appendPreamble(final XMLUtil util, final Appendable appendable) throws IOException {
        if (this.preambleWritten)
            return;

        appendable.append("<table:table");
        util.appendEAttribute(appendable, "table:name", this.builder.getName());
        util.appendEAttribute(appendable, "table:style-name",
                this.builder.getStyleName());
        util.appendAttribute(appendable, "table:print", false);
        appendable.append("><office:forms");
        util.appendAttribute(appendable, "form:automatic-focus", false);
        util.appendAttribute(appendable, "form:apply-design-mode", false);
        appendable.append("/>");
        this.appendColumnStyles(this.builder.getColumnStyles(), appendable, util);
        this.preambleWritten = true;
    }
228047
@Override
    public void writeXML(@WillClose Writer out) throws IOException {
        assert project != null;
        bugsPopulated();
        XMLOutput xmlOutput;
        // if (project == null) throw new NullPointerException("No project");


        xmlOutput = new OutputStreamXMLOutput(out);

        writeXML(xmlOutput);
    }
1276378
public void addContent(String path, ContentElement content) throws IOException {
    String fullPath = buildJcrPathForZip(path) + "/" + DOT_CONTENT_XML;
    Document doc = xmlContentBuilder.buildContent(content);
    writeXmlDocument(fullPath, doc);
  }
349073
@Override
    public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
            throws IOException {
        RegionFooterHeader
                .appendRegionXMLToMasterStyle(util, appendable, this.leftRegion, "region-left");
        RegionFooterHeader
                .appendRegionXMLToMasterStyle(util, appendable, this.centerRegion, "region-center");
        RegionFooterHeader
                .appendRegionXMLToMasterStyle(util, appendable, this.rightRegion, "region-right");
    }
783757
public void writeXml(OutputStream out) throws IOException {
        Properties properties = getProps();
        try {
            Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            Element conf = doc.createElement("configuration");
            doc.appendChild(conf);
            conf.appendChild(doc.createTextNode("\n"));
            for (Enumeration e = properties.keys(); e.hasMoreElements();) {
                String name = (String) e.nextElement();
                Object object = properties.get(name);
                String value;
                if (object instanceof String) {
                    value = (String) object;
                } else {
                    continue;
                }
                Element propNode = doc.createElement("property");
                conf.appendChild(propNode);

                Element nameNode = doc.createElement("name");
                nameNode.appendChild(doc.createTextNode(name));
                propNode.appendChild(nameNode);

                Element valueNode = doc.createElement("value");
                valueNode.appendChild(doc.createTextNode(value));
                propNode.appendChild(valueNode);

                conf.appendChild(doc.createTextNode("\n"));
            }

            DOMSource source = new DOMSource(doc);
            StreamResult result = new StreamResult(out);
            TransformerFactory transFactory = TransformerFactory.newInstance();
            Transformer transformer = transFactory.newTransformer();
            transformer.transform(source, result);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
324250
public static void appendUnpaddedInteger(Appendable appendable, long value) throws IOException {
        int intValue = (int)value;
        if (intValue == value) {
            appendUnpaddedInteger(appendable, intValue);
        } else {
            appendable.append(Long.toString(value));
        }
    }
1209071
public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
            throws IOException {
        appendable.append("<style:master-page");
        util.appendEAttribute(appendable, "style:name", this.name);
        util.appendEAttribute(appendable, "style:page-layout-name", this.layoutName);
        appendable.append("><style:header>");
        this.header.appendXMLToMasterStyle(util, appendable);
        appendable.append("</style:header>");
        appendable.append("<style:header-left");
        util.appendAttribute(appendable, "style:display", false);
        appendable.append("/>");
        appendable.append("<style:footer>");
        this.footer.appendXMLToMasterStyle(util, appendable);
        appendable.append("</style:footer>");
        appendable.append("<style:footer-left");
        util.appendAttribute(appendable, "style:display", false);
        appendable.append("/>");
        appendable.append("</style:master-page>");
    }
1264327
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    if(durablePseudoDestID != null)
    {
      writer.newLine();
      writer.taggedValue("durablePseudoDestID", durablePseudoDestID);
    }
    if(durableSubName != null)
    {
      writer.newLine();
      writer.taggedValue("durableSubName", durableSubName);
    }
  }
276534
public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
        this.appendMinIntegerDigitsAttribute(util, appendable);
        this.appendGroupingAttribute(util, appendable);
    }
857127
public void appendNumberTag(final XMLUtil util, final Appendable appendable) throws IOException {
		appendable.append("<number:number");
		this.appendXMLAttributes(util, appendable);
		appendable.append("/>");
	}