Parsing XML

The Oracle XML Parser for PL/SQL provides PL/SQL developers with a set of APIs for parsing, manipulating, and transforming XML documents inside the database. As we’ll see in Chapter 6, these same APIs are available to Java programmers as well using the Oracle XML Parser for Java. As illustrated in Figure 5.1, in Oracle8i Releases 1, 2, and 3—server versions 8.1.5, 8.1.6, and 8.1.7, respectively—the Oracle XML Parser for PL/SQL is a set of PL/SQL packages that expose the underlying functionality of the XML Parser for Java. In the 8.1.7 release, the XML Parser for Java is natively compiled inside the server for better performance.

XML Parser for PL/SQL wraps the XML Parser for Java

Figure 5-1. XML Parser for PL/SQL wraps the XML Parser for Java

The packages included in the Oracle XML Parser for PL/SQL are listed in Table 5.1.

Table 5-1. Key PL/SQL Packages for Working with XML

PL/SQL Package Name

Description

xmlparser

Contains datatypes, functions, and procedures for parsing XML

xmldom

Contains datatypes, functions, and procedures for creating and manipulating the members of an XML document’s object model like elements, attributes, text, comments, etc.

xslprocessor

Contains datatypes, functions, and procedures for transforming XML documents using XSLT stylesheets and searching an in-memory XML document using XPath expressions

Tip

In this chapter, we build up various PL/SQL helper packages that centralize the ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.