TaBliz Articles


Your Data in XML Format

You can use TaBliz to easy get data in XML format from almost any data source

The following sample shows you how to get xml data from the Northwind.mdb file

 Response.Expires = -1
 Response.Buffer = false
 Response.ContentType = "text/xml"
 Response.CharSet = "iso-8859-2"

 Dim TBLZ
 Set TBLZ = Server.CreateObject ("TaBliz.AdminRecordset")
 TBLZ.DatabasePath = "C:\www_odbc\october28\northwind.mdb"
 TBLZ.Recordset = "Products"
 TBLZ.Report.IsXML = true
 TBLZ.Report.WhereClause = "WHERE ProductID=3"
 TBLZ.DoReport
	

As you can see the DoReport Method is used. But we have set the IsXML property of the Report object to true so that an output in XML format is given.

Also notice the WhereClause property used to display only certain records. You can programmatically set this property. For example suppose you wish to retrieve XML blocks based on the following client request

http://www.myserver.com/mypage.asp?ID=3

In "mypage.asp" page you write the above code, except for the "whereclause" that has to be set like this

TBLZ.Report.WhereClause = "WHERE ProductID=" & Request("ID") & ""