docs: public int read() throws KNXMLException
  	{
  		while (canRead()) {
  			// init line counter on first read
  			if (line == 0)
  				line = 1;
  
  			read('<');
  			String str = read('>');
  			// if no comment and no closing tag
  			if (str.length() == 0 || skipComment(str) || skipInstruction(str))
  				continue;
  			final StringBuffer buf = new StringBuffer();
  			if (readCDATASection(str, buf)) {
  				elem = new DefaultElement((String) openElems.peek());
  				elem.setCharacterData(buf.toString());
  				pos = CHAR_DATA;
  				return pos;
  			}
  			str = str.trim();
  			// extract element name
  			final String name = splitOnSpace(str);
  			if (name.charAt(0) == '/') {
  				if (!name.substring(1).equals(openElems.peek()))
  					throw new KNXMLException("element end tag does not match start tag",
  						name.substring(1), line);
  				elem = new DefaultElement((String) openElems.pop());
  				pos = END_TAG;
  				return pos;
  			}
  			elem = new DefaultElement(name);
  			extractAttributes(str.substring(name.length()));
  			if (!elem.isEmptyElementTag())
  				openElems.push(name);
  			pos = START_TAG;
  			return pos;
  		}
  		if (!openElems.empty())
  			throw new KNXMLException("end of XML input with elements left open");
  		pos = END_DOC;
  		return pos;
  	}