> Basically I'm > looking for the XML/DOM equivalent of regular expression matching, something > that can answer the question: "given a pattern P, is DOM tree D valid?" Sounds like you want pytrex. /r$