Posts

Showing posts with the label XML

XML generation with Oracle ADF

Image
JDev: 12.2.1.3.0
Source: GitHub

XML generation is something we use quite extensively in ADF products - be it for PDF generation, or for printing labels on a Zebra printer or for sending data to an external system. And ADF BC does have an out-of-the-box support for generating XML documents straight out of its view objects, via its writeXML API.
However, there are times when we need to stretch the XML documents - maybe create a custom XML, or import a custom node inside a ADF BC generated XML. This article intends to provide a working solution for these extra bits, along with a few tweaks for the standard process.
This article will cover 3 use-cases: 1. Generate a standard XML from ADF BC, with node names of our choice. 2. Generate a custom XML from an XSD schema. 3. Combine the above two XMLs into a composite XML document.
The sample application uses Departments and Employees tables from HR schema. To keep the size of the XMLs small, the VOs have been tuned to return only 5 records.
T…