A structured data retrieval apparatus stores, in a first memory, a
plurality of template IDs used to identify locations of a plurality of
structure elements included in a hierarchical structure, stores, in a
second memory, a plurality of structured data items each of which
includes a plurality of elements, each of the elements being assigned a
template ID of one of the structure elements, inputs a retrieval
condition which designates a first structure element of the structure
elements, and a character string included in the first structure element,
retrieves, from the structured data items, a structured data item
including a first element which includes the character string and is
assigned a first template ID of the first structure element, and outputs
the structured data item retrieved.