1. A method of linking elements in a computer-generated document to corresponding data in a database, comprising: attaching a schema file associated with at least one intended use of the document to a document defining rules associated with a markup language to be applied to the document, wherein the markup language is XML and wherein the rules associated with the markup language to be applied to the document comprise names of elements of the markup language and data types associated with the names of the elements of the markup language; applying the elements of the markup language to the document; establishing data fields within the database for linking to corresponding markup language elements in the document; writing a unique document identifier number to the document for linking the data fields in the database to the document, wherein linking the data fields in the database to the document comprises: determining if a table associated with the document exists within a document library; if no table is associated with the document, creating a table containing user-defined elements associated with the document; selecting a table within a document library, the document library being maintained in the database where the table is associated with the document, and linking at least one markup language element in the document to corresponding data in the database; when data is entered into the database associated with the given markup language element in the document, automatically writing the data to the document in a location in the document associated with the given markup language element; when the given markup language element in the document is modified, automatically updating the corresponding data in the database; providing at least one suggested document element according to the schema file associated with the at least one intended use of the document, wherein the at least one suggested document element comprises an element structure linked to at least one corresponding data field in the database; and enforcing at least one element constraint according to the schema file, wherein the element constraint comprises at least one piece of required data for at least one document element.