1. A method comprising: identifying a document structure instance that includes structure components; choosing a selected structure component from the structure components; generating, with a processor, a hierarchical graph based on the selected structure component, the hierarchical graph including classes, a class definition relationship, and an instance identifier that identifies the selected structure component; and outputting the hierarchical graph.