One aspect of the present invention is a system for classifying element nodes in a subtree-structured XML database. The XQE structural-textual classification system is sensitive to both the textual resemblance between document elements as well as the structural resemblance between document elements. The XQE structural-textual classification system might use the XQE parent-child index described in Lindblad II-A for the purpose of forming vectors of “terms” which encode both the structural and the textual content of XML elements. The element vectors are processed by a classifier to create class prototype vectors which can be used to classify elements as they are added to the database.