Provides structured-document processing device for detecting a
relationship of approximateness between structured documents effectively.
State-transition-diagram information storing means stores information
concerning a state transition diagram where source nodes of a source
structured document transit in order of occurrence from the head thereof.
Extracting means extracting, a pair consisting of a new node and a
corresponding source node in accordance with order of occurrence.
Matching means determining whether the source and new nodes in the
selection pair have matchingness, on the basis of their descriptions.
Node qualifying means qualifying the source node as a node to be used for
the new node. Transition-history information generating means generates,
as transition-history information, information concerning a transition
history regarding the node to be used. Degree-of-approximateness
detecting means detects a degree of approximateness between the source
structured document and the new structured document on the basis of the
transition-history information.