XMLExporter

The XML Exporters are used for writing business objects to XML. Every business object can be exported, either by specifying an array of ObjectIds or by specifying a where clause to use for loading the objects. Exporting non-global objects requires the parent object to be specified for the methods that have where clause parameters.

Another XMLExporter method, exportFullProject, exports a project and all of its child objects (such as WBS, Activities, ResourceAssignments, etc.). XML files created using exportFullProject can be imported using the XMLImporter.

When objects are exported, the fields to be exported can be specified. If the fields parameter is null, the default XML export fields will be used for each object. Since the default fields are the writable fields, you can obtain this list of default fields by calling getWritableFields() on each business object class.

To specify specific business object types or fields to be included in the export, use XMLExporterListener. See the exporter demo application (ExportDemoApp.java) for example code.

Note: All business objects can be written individually to XML even without using the XMLExporter. Simply call toString() on a business object instance and all fields currently loaded in that business object will be output to XML using the p6apibo.xsd schema.



Last Published Friday, February 2, 2024