Search Results dbms_xmlsave




Overview

SYS.DBMS_XMLSAVE is a core Oracle-supplied PL/SQL package that provides a native, server-side mechanism for applying XML data to relational database tables. It belongs to the SYS schema and is a standard component of the Oracle database kernel delivered with the version underlying Oracle E-Business Suite 12.1.1 and 12.2.2. Within the EBS technology stack, the package is classified under the ETRM API category of OTHER, reflecting the fact that it is an Oracle RDBMS feature rather than an EBS application-tier API.

The business function of DBMS_XMLSAVE is to translate an XML document into a series of INSERT, UPDATE, and DELETE operations against a target table or view. As a package with a VALID status and both a package specification and package body present, it is fully compiled and available to any session with the appropriate EXECUTE privilege. The package exposes a documented total of 32 procedures and functions, making it a substantial and complete interface for XML-to-relational operations. It is functionally complementary to DBMS_XMLGEN, which performs the reverse transformation (relational data to XML), and together the two packages support round-trip XML integration scenarios.

Key Procedures and Functions

The documented procedures fall into several functional groupings:

  • Context management: NEWCONTEXT allocates a save context that binds a result set or table to subsequent operations; CLOSECONTEXT releases that context and its associated resources.
  • XSLT control: SETXSLT associates an XSL transformation with the context, allowing incoming XML to be mapped before it reaches the target. SETXSLTPARAM supplies a parameter to that transformation, and REMOVEXSLTPARAM removes a previously set parameter.
  • Tag and parsing configuration: SETROWTAG identifies the XML element that represents a row. SETSQLTOXMLNAMEESCAPING, SETPRESERVEWHITESPACE, and SETIGNORECASE control how the parser handles name escaping, whitespace, and case sensitivity. SETDATEFORMAT defines the expected date representation in the XML.
  • Batch and transaction control: SETBATCHSIZE sets the number of rows processed per batch, and SETCOMMITBATCH determines the commit behavior across batches.
  • Key and update-column mapping: SETKEYCOLUMN identifies the column used to match XML rows to existing table rows, SETUPDATECOLUMN restricts which columns may be updated, and the matching CLEARKEYCOLUMNLIST and CLEARUPDATECOLUMNLIST procedures reset those lists.
  • Data manipulation: INSERTXML, UPDATEXML, and DELETEXML perform the actual row-level operations from the XML source. PROPAGATEORIGINALEXCEPTION controls error reporting so the originating exception is surfaced rather than masked.

Tables Accessed

The ETRM metadata records no fixed tables referenced through APPS synonyms. This is expected: DBMS_XMLSAVE is a generic, dictionary-independent utility. The target table is not hard-coded but is supplied by the caller when the context is created, so the package reads and writes only the application tables named at runtime. Its internal dependencies are limited to the SYS schema and the STANDARD package, and the package is referenced by PUBLIC and by SYS itself, indicating it is exposed as a public synonym for general use.

Usage Notes

Because the ETRM record shows the package is referenced by zero other EBS packages, DBMS_XMLSAVE is not part of any standard EBS concurrent program or form dependency chain; it is invoked explicitly. Typical use is within custom PL/SQL integration code, interface programs, or external-system load routines that receive XML payloads and must persist them into EBS interface or staging tables. A caller normally opens a context with NEWCONTEXT, configures row tags, key columns, and batch settings, invokes the appropriate insert, update, or delete procedure, and then closes the context. The XSLT-related procedures allow source XML whose structure differs from the target table to be transformed in-line before saving, which is useful when integrating with third-party systems that emit non-EBS XML formats. The batch and commit controls make the package suitable for high-volume loads. Direct use from Oracle Forms is uncommon; the package is predominantly driven from backend PL/SQL jobs and custom concurrent programs, and the EXECUTE privilege should be granted deliberately given its direct DML capabilities.