1. A method for inferring a schema from hierarchical data comprising: in an application program, receiving the electronic document containing the hierarchical data, wherein the hierarchical data includes one or more fields; (a) discovering one of the fields in the hierarchical data; (b) saving content associated with the discovered field; (c) repeating tasks (a)-(b) until the content for each discovered field has been saved; and generating the schema based on the content saved for each discovered field.