Customizing the Data Load utility for XML input
This tutorial demonstrates how to customize the Data Load utility to load data from an XML file.
If your XML files use a different format than the format that is supported by default, you can use this tutorial to help you create an XML reader that supports the XML format of your files.
The following diagram shows the data load process flow.
- The data reader reads the input file, and transforms the input into a data object. Data objects are typically Map objects.
- The business object builder instantiates the business object and populates it from the data in the data object.
- The business object mediator converts the business object into physical object.
- The data writer writes the physical object into the database.
The provided CSV reader reads the input files and creates Map objects. XML files are difficult to represent in a Map object because they have complex structures. In this scenario, you create a reader that builds the logical object directly from the input XML file. Since this reader is creating a logical object, the default business object builder is used. The default business object builder returns the input data object without changing it.
Learning objectives
- Create your XML data reader
- Configure the Data Load utility to use your data reader and mediator
Time required
This tutorial is expected to take 1 hour to complete.Skill level
IntermediateAudience
This tutorial is intended for WebSphere Commerce developers who want to customize the data load utility to read from XML files.System requirements
Before you begin this tutorial, ensure that you complete the following prerequisites:Prerequisites
Saving the sample code
Before you begin this tutorial, download the DataLoadSample.zip. Save this file onto your development machine. As an example, you might save it into the WCDE_installdir directory.
Knowledge prerequisites
- A basic understanding of the Data Load utility architectural overview
- A basic understanding of DOM
- An understanding of Service Data Objects (SDO)