How Do I Generate HTML Output from PL/SQL?
How Do I Generate HTML Output from PL/SQL? :
This POST introduces an additional method, PL/SQL server pages,
that lets you build on your knowledge of HTML tags, rather than
learning a new set of function calls.
Traditionally, PL/SQL web applications have used function calls to
generate each HTML tag for output, using the PL/SQL web toolkit packages
that come with Oracle9i Application Server (iAS), Oracle Application Server
(OAS), and WebDB:
owa_util.mime_header('text/html');
htp.htmlOpen;
htp.headOpen;
htp.title('Title of the HTML File');
htp.headClose;
htp.bodyOpen( cattributes => 'TEXT="#000000" BGCOLOR="#FFFFFF"');
htp.header(1, 'Heading in the HTML File');
htp.para;
htp.print('Some text in the HTML file.');
htp.bodyClose;
htp.htmlClose;
You can learn the API calls corresponding to each tag, or just use some
of the basic ones like HTP.PRINT to print the text and tags together:
htp.print('<html>');
htp.print('<head>');
htp.print('<meta http-equiv="Content-Type" content="text/html">');
htp.print('<title>Title of the HTML File</title>');
htp.print('</head>');
htp.print('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
htp.print('<h1>Heading in the HTML File</h1>');
htp.print('<p>Some text in the HTML file.');
htp.print('</body>');
htp.print('</html>');
that lets you build on your knowledge of HTML tags, rather than
learning a new set of function calls.
Traditionally, PL/SQL web applications have used function calls to
generate each HTML tag for output, using the PL/SQL web toolkit packages
that come with Oracle9i Application Server (iAS), Oracle Application Server
(OAS), and WebDB:
owa_util.mime_header('text/html');
htp.htmlOpen;
htp.headOpen;
htp.title('Title of the HTML File');
htp.headClose;
htp.bodyOpen( cattributes => 'TEXT="#000000" BGCOLOR="#FFFFFF"');
htp.header(1, 'Heading in the HTML File');
htp.para;
htp.print('Some text in the HTML file.');
htp.bodyClose;
htp.htmlClose;
You can learn the API calls corresponding to each tag, or just use some
of the basic ones like HTP.PRINT to print the text and tags together:
htp.print('<html>');
htp.print('<head>');
htp.print('<meta http-equiv="Content-Type" content="text/html">');
htp.print('<title>Title of the HTML File</title>');
htp.print('</head>');
htp.print('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
htp.print('<h1>Heading in the HTML File</h1>');
htp.print('<p>Some text in the HTML file.');
htp.print('</body>');
htp.print('</html>');
Comments
Post a Comment