code: public void require(int type, String namespaceURI, String localName)
  			throws XMLStreamException {
  
  		int eventType = getEventType();
  
  		if (eventType == type) {
  			switch (eventType) {
  			case XMLStreamConstants.START_ELEMENT:
  				if (namespaceURI != null) {
  					if (!this.element.getNamespaceUri().equals(namespaceURI)) {
  						throw new XMLStreamException();
  					}
  				}
  				if (localName != null) {
  					if (!this.element.getLocalName().equals(localName)) {
  						throw new XMLStreamException();
  					}
  				}
  				break;
  			case XMLStreamConstants.ATTRIBUTE:
  				// TODO which attribute?
  				throw new XMLStreamException();
  			}
  		} else {
  			throw new XMLStreamException();
  		}
  
  	}
docs: /*
  Test if the current event is of the given type and if the namespace and
  name match the current namespace and name of the current event. If the
  namespaceURI is null it is not checked for equality, if the localName is
  null it is not checked for equality.
  
  (non-Javadoc)
  
  @see javax.xml.stream.XMLStreamReader#require(int, java.lang.String,
  java.lang.String)