code: @Override
      protected void closeStartElement(boolean emptyElem)
          throws XMLStreamException
      {
          mStartElementOpen = false;
          if (mAttrNames != null) {
              mAttrNames.clear();
          }
  
          try {
              if (emptyElem) {
                  mWriter.writeStartTagEmptyEnd();
              } else {
                  mWriter.writeStartTagEnd();
              }
          } catch (IOException ioe) {
              throwFromIOE(ioe);
          }
  
          if (mValidator != null) {
              mVldContent = mValidator.validateElementAndAttributes();
          }
  
          // Need bit more special handling for empty elements...
          if (emptyElem) {
              String localName = mElements.removeLast();
              if (mElements.isEmpty()) {
                  mState = STATE_EPILOG;
              }
              if (mValidator != null) {
                  mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
              }
          }
      }
docs: Method called to close an open start element, when another
  main-level element (not namespace declaration or
  attribute) is being output; except for end element which is
  handled differently.