code: public void flushPending() throws SAXException
      {
      
              if (m_needToCallStartDocument)
              {
                  startDocumentInternal();
                  m_needToCallStartDocument = false;
              }
  
              if (m_elemContext.m_startTagOpen)
              {
                  closeStartTag();
                  m_elemContext.m_startTagOpen = false;
              }
              
              if (m_cdataTagOpen)
              {
                  closeCDATA();
                  m_cdataTagOpen = false;
              }
  
      }
docs: This method flushes any pending events, which can be startDocument()
  closing the opening tag of an element, or closing an open CDATA section.