Skip Headers
Oracle® TopLink Developer's Guide
10g (10.1.3.1.0)
B28218-01
  Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

Configuring Document Preservation

TopLink lets you preserve any "extra" data in your XML source that is not required to map to an object model (such as comments, processing instructions, or unmapped elements).

This permits round-tripping from XML to objects and back to XML without losing any data.

Using TopLink Workbench

To preserve the entire XML source document, use this procedure:

  1. Select a descriptor in the Navigator. Its properties appear in the Editor.

  2. Click the Descriptor Info tab. The Descriptor Info tab appears.

    Figure 29-7 Descriptor Info Tab, Preserve Document Option

    Description of Figure 29-7 follows
    Description of "Figure 29-7 Descriptor Info Tab, Preserve Document Option"

Select the Preserve Document option to maintain any extra information from the source XML document that TopLink does not require (such as comments).

Using Java

To configure an XML descriptor to maintain any extra information from the source XML document that TopLink does not require (such as comments) using Java, create a descriptor amendment method (see "Configuring Amendment Methods") that configures the descriptor using XMLDescriptor method setShouldPreserveDocument.