xml spy
Previous  Top  Next

Mappings and root element of target documents


Root element of target XML files

When creating a mapping to the root element of the target Schema/XML file, please make sure that only one element, or record, is passed on to the target XML, as an XML document may only have one root element.

 

Use the filter component to limit the mapped data to a single element or record.

 

In the example below, the ForeignKey is checked to see if it is 1, and only then is one Altova element passed on to the target root element.
If no mappings exist from any of the source items to the target root element, then the root element of the target schema is inserted automatically.

 

root-mapping1a

 

 

Root element not limited:

If you do not limit the target schema root element, then all source elements/records are inserted between the first root element. This will still create well-formed, but not valid, XML files.

 


Previous  Top  Next

© 2008 Altova