To efficiently search an evaluation result of a plurality of XPath expressions with respect to a data file such as an XML document: an evaluation result of an XPath expression is obtained by generating a data structure with a redundant element by evaluating what common part or dependency has been omitted from a plurality of XPath expressions to be evaluated, and then the data structure is used with respect to a data file to be processed.
Target subtree setting means sets a target subtree relating to a content portion. Occurrence mode detecting means collates a target subtree relating to a content with a tree relating to each of past structured/hierarchical contents and detects an occurrence mode of each node of the target subtree. Statistical information generating means generates statistical information concerning an occurrence frequency of the occurrence mode of each node in the target subtree. Classifying means classifies each node of the target subtree based on the statistical information and a result of detecting the occurrence mode. Matching pattern generating means generates the matching pattern for the target content portion based on the classification. The structured/hierarchical contents are identified by use of the matching pattern.