1. A document processing apparatus comprising: a first reading part that reads a form; a marking detection part that detects a marking written on the form from data read by the first reading part; an attribute name extraction part that extracts a character string described beforehand within or near a marking area of the detected marking as an attribute name; an attribute information memory that stores the attribute name extracted by the attribute name extraction part; a second reading part that reads the form on which the attribute values are entered; an attribute name detection part that detects the attribute name stored in the attribute information memory and specifies the descriptive position of the detected attribute name from the read data by the second reading part; and an attribute value extraction part that extracts the character string around the detection position of the attribute name detected by the attribute name detection part from the read data by the second reading part, and registers the extracted character string as the attribute value of the attribute associated with the attribute name in the attribute information memory.