Example - Creating Fragments with Required Parents Only
In this example, the split element is a subelement, <country>, which is a part of the <Employee> element.
<?xml version="1.0" encoding="ISO-8859-1"?> <Employees> <Employee> <name>Josephine Foller</name> <department>Marketing</department> <country>USA</country> <employ-type>Permanent</employ-type> <year>1985</year> </Employee> <Employee> <name>Kris Amigon</name> <department>Marketing</department> <country>UK</country> <employ-type>Permanent</employ-type> <year>1997</year> </Employee> <Employee> ............. ............. </Employees>
The fragments created contain one fixed header which includes unrequired elements such as <name> and <department> element.
<?xml version="1.0" encoding="ISO-8859-1"?> <Employees> <Employee> <name>Josephine Foller</name> <department>Marketing</department> <country>USA</country> <employ-type>Permanent</employ-type> <year>1985</year> </Employee> <Employee> <name>Kris Amigon</name> <department>Marketing</department> <country>UK</country> <employ-type>Permanent</employ-type> <year>1997</year> </Employee> <Employee> ............. ............. </Employees>
<?xml version="1.0" encoding="ISO-8859-1"?> <Employees> <Employee> <name>Josephine Foller</name> <department>Marketing</department> <country>USA</country> ............. <country>UK</country> </Employee> </Employees>
If you want the fragment to contain only the repeating subelements (without the above unrequired elements), you can specify the split element as a /Employees/Employee/country expression on the Input tab of the activity.
<?xml version="1.0" encoding="ISO-8859-1"?> <Employees> <Employee> <country>USA</country> ............. <country>UK</country> </Employee> </Employees>
Copyright © Cloud Software Group, Inc. All rights reserved.
