Search Results write_leaf_element
Overview
XNP_XML_UTILS is an Oracle E-Business Suite PL/SQL utility package owned by the APPS schema. It provides a shared library of primitive routines for constructing, manipulating, and emitting XML documents from within the E-Business Suite database tier. The package encapsulates the mechanics of tag generation, element writing, document initialization, and XML declaration so that other PL/SQL programs do not need to hand-assemble XML strings. Its header comment identifier (XNPXMLPS.pls, version 120.2, dated 2006) confirms it is a long-standing component of the EBS codebase and is present in both the 12.1.1 and 12.2.2 releases.
In the 12.2.2 ETRM metadata, the package is classified as API classification OTHER, has 17 documented procedures and functions, and is referenced by 83 other packages, indicating that it serves as a foundational XML building block across multiple EBS product families rather than a single application module. The package is declared AUTHID CURRENT_USER, so execution privileges are evaluated against the calling user rather than the definer.
Key Procedures and Functions
- DECODE — Performs a tag value lookup, extracting a value from message text by tag name.
- APPEND — Appends an XML document fragment to the existing in-memory document. It is overloaded for VARCHAR2, NUMBER, and DATE inputs.
- INITIALIZE_DOC — Initializes the global XML document variable. One form accepts a message code and DTD URL; an overloaded form takes no arguments.
- XML_DECL — Writes the XML declaration for the document being constructed.
- GET_DOCUMENT — Retrieves the fully constructed XML document as a VARCHAR2 output.
- WRITE_ELEMENT — Writes a character, date, or numeric element to the XML document; three overloaded forms exist.
- WRITE_LEAF_ELEMENT — Writes a leaf (terminal, self-contained) element to the XML document. This is the procedure the user searched for. It is overloaded for VARCHAR2, DATE, and NUMBER values, emitting a complete element with both opening and closing tags in a single call.
- END_SEGMENT — Adds a closing end tag for the element being specified.
- BEGIN_SEGMENT — Adds a starting tag for the XML element being constructed, pairing with END_SEGMENT for nested structures.
- CONVERT — Provides value conversion support used in document assembly.
The distinction between WRITE_ELEMENT and WRITE_LEAF_ELEMENT is operationally significant: WRITE_ELEMENT supports container-style elements requiring a separate close, whereas WRITE_LEAF_ELEMENT produces a self-terminating element in one invocation.
Tables Accessed
The only documented table reference is PLITBLM, accessed through an APPS synonym. This is the standard EBS message repository used for multilingual text lookup, consistent with the DECODE procedure's tag value lookup behavior. The package does not persist constructed XML to any table of its own; output is returned to the caller via GET_DOCUMENT.
Usage Notes
XNP_XML_UTILS is typically invoked from custom PL/SQL programs, concurrent programs, and other packages that must generate XML payloads for interfaces, outbound messages, or integration endpoints. Given that 83 packages reference it, callers should treat any modification to its behavior as high-impact. The typical call sequence is INITIALIZE_DOC, XML_DECL, BEGIN_SEGMENT / WRITE_ELEMENT / WRITE_LEAF_ELEMENT / END_SEGMENT, and finally GET_DOCUMENT to retrieve the assembled document.
-
PACKAGE: APPS.XNP_XML_UTILS
12.2.2
-
PACKAGE: APPS.XNP_XML_UTILS
12.1.1
-
PACKAGE BODY: APPS.XNP_XML_UTILS
12.1.1
-
PACKAGE BODY: APPS.XNP_XML_UTILS
12.2.2
-
APPS.XNP_XML_UTILS dependencies on XDP_UTILITIES
12.1.1
-
APPS.XNP_XML_UTILS dependencies on XDP_UTILITIES
12.2.2
-
APPS.XNP_XML_UTILS dependencies on XNP_UTILS
12.1.1
-
APPS.XNP_XML_UTILS dependencies on XNP_UTILS
12.2.2