A computer-based method for accessing a markup language document. The method includes receiving a data access request from an application that is in form of a database language statement and indicates a markup language document. The data access request is processed to identify the markup language document, and a communication connection is provided to the markup language document. The markup language document is then accessed or processed based on the database language statement. A result set is generated and returned to the application. Typically, the result set is in tabular form with data from the markup language document provided in rows and columns. The method includes dynamically mapping the markup language document to a database structure or records based on the received database language statement. Common tag prefixes in the statement are identified, and the elements in the document are grouped into records.