Chapter 10. Generating Datagrams with PL/SQL

Developers using the Oracle database, the Oracle Developer toolset, or any of Oracle’s family of packaged applications are likely to be familiar with Oracle’s built-in procedural language, PL/SQL. Conceived as a language for data processing, PL/SQL features seamless integration with SQL and makes quick work of virtually any task that involves programmatically querying or modifying database data. This chapter covers the basic techniques available in PL/SQL for delivering XML datagrams as part of your Oracle XML applications. Even Java developers may find PL/SQL comes in handy for some database stored procedures and triggers, so we start with a quick overview of PL/SQL.

Programmatically Generating XML Using PL/SQL

In releases of the Oracle database prior to Oracle8i, PL/SQL is the language for server-side application code. In Oracle8i, where Java and PL/SQL may be used interchangeably for server-side development, even Java developers may find PL/SQL easier to use for certain data-intensive tasks.

Here we take a rapid tour of the bare necessities required to understand the structure of PL/SQL programs and to put the basic PL/SQL language constructs to work for XML data publishing.


For more detailed information on PL/SQL, see the O’Reilly Oracle Center online at for numerous authoritative titles on the subject, including Oracle PL/SQL Programming, second edition, by Steven Feuerstein and Bill Pribyl.

Organization ...

Get Building Oracle XML Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.