public void startDocument(String encoding, Boolean standalone)
            throws IOException {
        m_writer.write("<?xml version='1.0' ");

        if (encoding != null) {
            this.encoding = encoding;
            if (encoding.toLowerCase().startsWith("utf"))
                unicode = true;
        }

        if (this.encoding != null) {
            m_writer.write("encoding='");
            m_writer.write(this.encoding);
            m_writer.write("' ");
        }

        if (standalone != null) {
            m_writer.write("standalone='");
            m_writer.write(standalone.booleanValue() ? "yes" : "no");
            m_writer.write("' ");
        }
        m_writer.write("?>");
    }