1. A computer method, comprising executing at least the following operations in at least one data processing device: establishing a mapping from lists and scalars corresponding to at least one data source into XML elements and attributes; and expressing the mapping in constructs of a mapping language, wherein the mapping language includes two constructs: the binding specification and the value specification, wherein the value specification associates with a value or choice declaration, wherein the binding specification includes at least one variable/expression pair, wherein the at least one data source comprises multiple heterogeneous data sources, and the method further comprises: using a pre-established Document Type Definition (DTD) corresponding to the multiple heterogeneous data sources; and based on the pre-established DTD and the multiple heterogeneous data sources, adding annotations to the pre-established DTD to create an annotated DTD, such that an Extensible Markup Language (XML) document generated from the annotated DTD is guaranteed to conform to the pre-established DTD.
1. A computer method, comprising executing at least the following operations in at least one data processing device: establishing a mapping from lists and scalars corresponding to at least one data source into XML elements and attributes; and expressing the mapping in constructs of a mapping language, wherein the mapping language includes two constructs: the binding specification and the value specification, wherein the value specification associates with a value or choice declaration, wherein the binding specification includes at least one variable/expression pair, wherein the at least one data source comprises multiple heterogeneous data sources, and the method further comprises: using a pre-established Document Type Definition (DTD) corresponding to the multiple heterogeneous data sources; and based on the pre-established DTD and the multiple heterogeneous data sources, adding annotations to the pre-established DTD to create an annotated DTD, such that an Extensible Markup Language (XML) document generated from the annotated DTD is guaranteed to conform to the pre-established DTD. 2. The method of claim 1 , wherein the data source is a relational database.