1. A method of linking elements in a computer-generated document to corresponding data in a database, comprising: applying elements of a markup language to the document; linking one or more markup language elements in the document to corresponding data in the database; entering data into the database associated with a given markup language element in the document; and in response to entering data 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.