code: private void writeStartElement(String elemName, Attributes atts) {
          for (int level = 0; level < m_tagStack.size(); level++) {
              m_stringWriter.write(m_prefix);
          }
          m_stringWriter.write('<');
          m_stringWriter.write(elemName);
          writeAttributes(atts);
          m_stringWriter.write('>');
          if (m_indent > 0) {
              m_stringWriter.write('\n');
          }
      }
docs: toAttributes