based on grammar/tokenizer from http://www.w3.org/XML/9707/xml-in-c.tar.gz
also see http://www.w3.org/XML/9707/XML-in-C

