Skip to main content

Problem:

This demo is a simple application which shows Net Express working with XML

Resolution:

INTRODUCTION

==========

This example demonstrates the use of the Extensible Markup Language (XML) within a Net Express Web application. XML code can be output via EXEC HTML language extensions provided by Net Express. Extensible Style Language (XSL) documents can also be used to translate the XML into HTML for output.

In this example a simple HTML input form will be displayed allowing the user to select one of three methods in which the XML page should be output. It can be displayed without a style sheet (only the bare XML code will be displayed) or with one of the two style sheets provided.

It uses embedded SQL to access the Net Express sample database "NetExpress Sample1" which will be stored in the NetExpress\\base\\ demo\\smpldata\\access directory as Demo.mdb. It accesses the table "Staff" within this data source.

It uses the data within this table as input for the generated XML form.

SOURCE FILES:

==========

Program Files        Description

------------------     -----------------------------------------------------------

INPUT.HTM           HTML input form which accepts the users choice as to how to present the XML

                             document.

MYCGI.CBL           Example CGI program which is called by INPUT.HTM. It will read the data from

                             the sample database and format an XML document using this data. The XML

                             will be dynamically created using EXEC HTML.

STAFF.CPY           Copy file containing SQL Table definition.

MYCGI.CPF           Copy file generated by Form Designer. Contains  form data variables for

                             INPUT.HTM.

MYCGI.CPY          Copy file generated by Form Designer. Contains program data variables for

                             INPUT.HTM.

MYCGI.CPV          Copy file generated by Form Designer. Contains procedure division statements

                             for converting and processing form data.

StaffXSL.CPY        Extensible Style Language (XSL) file used to output data in a list using a

                             different font.

StaffXSL2.CPY      Extensible Style Language (XSL) file used to output data in a table format.

REQUIREMENTS:

==========

You need to have Microsoft Access and the Access ODBC drivers installed in order to run this program. The ODBC drivers can be installed from the Net Express CD-ROM through the normal install procedure.

You also must have a Web Browser, such as Microsoft Internet Explorer V5.0, which supports XML.

OPERATION:

========

Rebuild this project to create the file mycgi.exe. Run it by selecting Animate or Run from the Net Express main menu.

==========================================================

Keywords: demonstration, sample, example, demo, web programming, xml.zip

demo.ex

demo.ne

demo.se

Attachments:

xml.zip

Old KB# 4209