xt according to an input query, and determining whether or not a position meeting the query is interposed between a specific tag indicating the start of a predetermined document element and a specific tag indicating the end of the document element; and means for adding, in the case where the position is so interposed, a character string including a character string of the position meeting the quer