Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
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.
To preserve the entire XML source document, use this procedure:
Select a descriptor in the Navigator. Its properties appear in the Editor.
Click the Descriptor Info tab. The Descriptor Info tab appears.
Figure 32-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).
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
.