1. A structured document processing apparatus performing syntax parsing of a structured document in the form of electronic data, comprising: a computing device including a processor reading instructions from a non-transitory storage medium performing the steps of: automaton generating which generates a state transition sequence of a plurality of states enabling sectioning of a structured document into a plurality of nodes; instance document analyzing which integrates state transitions in the state transition sequence generated by the automaton generating by using statistical information regarding an instance document which is an entity of the structured document and statistically obtains patterns in the number of occurrences of repetitive elements in the state transitions by using the statistical information; schema information analyzing which integrates the state transitions in the state transition sequence generated by the automaton generating by using schema information which defines a structure and a format of information regarding the structured document; automaton optimizing which mutually optimizes automatons integrated by the instance document analyzing and the schema information analyzing; and counting occurrences of consecutively matching state transitions by using a list of IDs.