December 1999
Intermediate to advanced
992 pages
22h 3m
English
If you know the table names and field names, it is a simple matter to construct an XML file from the recordset.
Again, the strategy in this section is to provide a simple example of an ASP page that connects to biblio.mdb and reads one of the tables into an XML file, and then to analyze the code.
The following listing of connect2.asp will connect to the biblio.mdb database and open the publishers table. It will then create an XML file called bib_pub.xml and read the PubId, telephone, and name fields for each record into the XML file. It will do this by iterating through the records and writing the following line of XML for every record:
<publisher> <PubId> [value] </PubId> <name>[value] </name> <telephone>[value] ...
Read now
Unlock full access