docs: public void complete(Element e) throws KNXMLException
  	{
  		if (e.isEmptyElementTag())
  			return;
  		final int index = openElems.lastIndexOf(e.getName());
  		if (index == -1)
  			throw new KNXMLException("element tag not read before", e.getName(), line);
  		String end = null;
  		final StringBuffer content = new StringBuffer(50);
  		while (canRead()) {
  			// read text content
  			final String s = read('<');
  			final boolean current = openElems.peek().equals(e.getName());
  			// if character data is for current element, append it
  			if (current && s.length() > 0)
  				content.append(References.replace(s, false));
  			// read a possible end tag
  			end = read('>');
  			if (skipComment(end))
  				;
  			else if (current && readCDATASection(end, content))
  				;
  			else if (end.length() > 0 && end.charAt(0) == '/') {
  				// actually, no white space is allowed between '/' and tag name
  				// but there might be some between end of name and '>'
  				final String tag = end.substring(1).trim();
  				// got end tag?
  				if (!tag.equals(openElems.peek()))
  					throw new KNXMLException("element end tag does not match start tag",
  						tag, line);
  				openElems.pop();
  				if (tag.equals(e.getName())) {
  					e.setCharacterData(content.toString());
  					pos = END_TAG;
  					return;
  				}
  			}
  			else if (end.length() > 0)
  				// don't push empty element tags
  				if (end.charAt(end.length() - 1) != '/') {
  					final String tag = splitOnSpace(end);
  					if (tag.length() > 0)
  						openElems.push(tag);
  				}
  		}
  		throw new KNXMLException("end of XML input with elements left open", end, line);
  	}