1. A structured document management device comprising: a structured document receiving unit configured to receive an input of a structured document having a layered logical structure; a structured document storage unit configured to store the input structured document; a query data receiving unit configured to receive an input of query data; a parser configured to parse the syntax of the received query data to acquire a parse tree in which the query data is decomposed so as to meet a static single assignment form which is defined such that each variable is assigned exactly once; a constraint acquiring unit configured to acquire a hierarchical condition that the variables of the parse tree need to meet and constraints that include conditions for values of the respective variables, from the parse tree obtained by the parser; a parse tree rewriting unit configured to rewrite the query data in such a form that the structured document is refinable by the constraints, based on the constraints obtained by the constraint acquiring unit; and a query execution unit configured to output a search result in response to the query data as an input that is rewritten by the parse tree rewriting unit.