code: private void doWriteStartElement(String localName)
          throws XMLStreamException
      {
          mAnyOutput = true;
          // Need to finish an open start element?
          if (mStartElementOpen) {
              closeStartElement(mEmptyElement);
          } else if (mState == STATE_PROLOG) {
              // 20-Dec-2005, TSa: Does this match DOCTYPE declaration?
              verifyRootElement(localName, null);
          } else if (mState == STATE_EPILOG) {
              if (mCheckStructure) {
                  reportNwfStructure(ErrorConsts.WERR_PROLOG_SECOND_ROOT, localName);
              }
              // Outputting fragment? Better reset to tree, then...
              mState = STATE_TREE;
          }
  
          /* Note: need not check for CONTENT_ALLOW_NONE here, since the
           * validator should handle this particular case...
           */
          /*if (mVldContent == XMLValidator.CONTENT_ALLOW_NONE) { // EMPTY content
              reportInvalidContent(START_ELEMENT);
              }*/
          if (mValidator != null) {
              mValidator.validateElementStart(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
          }       
  
          mStartElementOpen = true;
          mElements.addString(localName);
          try {
              mWriter.writeStartTagStart(localName);
          } catch (IOException ioe) {
              throwFromIOE(ioe);
          }
      }
docs: /*
  //////////////////////////////////////////////////
  Internal methods
  //////////////////////////////////////////////////