In this paper, we present an extension of PHIL, a declarative language for filtering information from XML data. The proposed approach allows us to extract relevant data as well as to exclude useless and misleading contents from an XML document. Essentially, it combines ontology reasoning with an approximate pattern-matching engine which searches for patterns in a flexible way (i.e. modulo renaming, insertion, and deletion of XML items) and ranks the results w.r.t. their cost. The filtering process is guided by the syntax as well as the semantics of the XML documents, since it relies on both the document structure and the ontological information to which the document is related. Such information is retrieved by querying (possibly remote) ontology reasoners. Ontology reasoning capabilities are integrated into the filtering language via an adapted version of the DIG interface, which is a standard framework for describing description logic systems. Our extension to the DIG interface a...