1. A structured data retrieval method comprising: storing, in a first memory, a plurality of template IDs used to identify locations of a plurality of structure elements included in a hierarchical structure; storing, 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; inputting a retrieval condition which designates a first structure element of the structure elements, and a character string included in the first structure element; retrieving, 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 outputting the structured data item retrieved.