When you run a session, the Integration Service outputs a new target XML file each time a new root value occurs in the data. You can add a FileName column to an XML view to generate a unique file name for each XML file. The file name overrides the default output file name in the session properties.
When you use the FileName column, you set up an Expression transformation or other transformation in the mapping to generate the unique file names to pass to FileName column.
To create a FileName column in an XML view:
Right-click the view in the XML Editor.
Select Create FileName Column.
The XML Editor creates a new string column in the view.
Change the column name in Columns window.
Exit the XML Editor.
The column appears in the XML definition. The XPath is $Filename.
When you use XML FileName ports, you need to specify the directory name for the file.