adapted to modified XmlTokenizer