code: public void endDocument() throws IOException {
  		// close all unclosed tag;
  		while (depth > 0) {
  			endTag(elNamespace[depth], elName[depth]);
  		}
  		// assert depth == 0;
  		// assert startTagIncomplete == false;
  		finished = pastRoot = startTagIncomplete = true;
  		out.flush();
  	}
docs: End document.
  
  @throws IOException Signals that an I/O exception has occurred.