SSIS Export XML File Task
Generate simple or nested XML files from SQL Server, Oracle, MySQL and other relational sources, without writing code.
Export XML File Task exports tables, views or SQL query output to an XML file or SSIS variable. Use simple mode for a quick export, or the Layout Editor to join multiple datasets (e.g. Customers, Orders, OrderDetails) into parent/child nested XML, with namespaces, file splitting and GZip compression.
The trial includes Export XML File Task and every other PowerPack component
- Control Flow Task in SSIS
- Runs in your environment
- Also runs in Azure Data Factory
- Fully functional 30-day trial

At a glance
What Export XML File Task can do
Export XML File Task generates simple or complex XML files from relational sources such as SQL Server, Oracle and MySQL. In a few clicks you can shape XML from single or multiple tables, including parent/child nested documents.
Export tables, views & queries
Export one or many tables, views or SQL query output from sources such as SQL Server, Oracle or MySQL to XML.
- Multiple objects or patterns in
Source(e.g.Sales%orSalesJan|SalesFeb) - Multi-character
SourceSplitCharto list multiple SQL statements - Simple mode exports without defining a layout
Nested XML layout editor
Craft complex XML with a visual drag-and-drop layout editor and live preview.
- Nested elements, attributes and document arrays
- Parent-child (one-to-many) joins between datasets
- Datasets read from a table or SQL query
Save to file, variable, GZip
Write the XML to a local file, an SSIS variable or a file connection, compress it in GZip format and append to or overwrite existing files.
TargetAccessMode: Direct, Variable or Connection; a variable target can feed a Web API or SOAP callCompressto *.gz, withKeepRawto keep the uncompressed fileAppendandOverwriteoptions for the target file
Namespaces & root options
Define namespaces and prefixes and control the XML declaration, root and row elements.
Namespaces(e.g.ns1=http://abc.com/schema1) andPrefixDoNotOutputXmlDeclarationandXmlStandaloneRootElementNameandRowElementName
NULL & character handling
Control how NULL values, empty nodes and special characters appear in the output.
DoNotOutputNullPropertyandDoNotOutputEmptyNestedPropertyEnableCustomEscapeSequencewithCustomEscapeSequenceRuleto search and replace characters
Split into multiple files
Automatically split exported XML into multiple files by size, row count or column value.
SplitFileswithMaxSizePerFileorMaxRowsPerFileGroupByColumn(e.g. Country) creates one file per value
Formatting & encoding
Fine-tune indentation, date/time format, culture and character encoding.
IndentOutputfor pretty printDateFormatandCultureEncoding(with or without BOM) orCharacterSet
SQL Server 2012–2025 & ADF
Runs in your environment on SQL Server 2012–2025 and Azure-SSIS.
- SQL Server 2025, 2022, 2019, 2017, 2016, 2014, 2012 (32/64-bit)
- Azure Data Factory (SSIS IR)
- Design packages in Visual Studio 2017, 2019, 2022, or 2026
- Windows only (64-bit OS): Windows 7–11 or Windows Server 2012–2025
See all features
- Export multiple tables/views to XML files (e.g.
Sales%orSalesJan|SalesFeb) - Export SQL query output to XML file
- Built-in Layout Editor for complex nested XML (document arrays, attributes, nested elements)
- Parent/child nested documents from single or multiple tables
- Save XML to a file, an SSIS variable or a file connection
- Automatically split XML into multiple files by size or number of records
- Split into one file per column value (e.g.
GroupByColumn= Country), with the value used as the file name suffix - GZip compression and append support
- Create multi-content XML documents
- Multiple characters allowed in
SourceSplitCharto list multiple SQL statements - Namespaces and prefixes, XML declaration, root and row element options
- Skip NULL values and empty nested elements
- Indent output (pretty print), date format, culture and encoding options (with or without BOM)
SingleDatasetArrayto produce an array from the main dataset without an extra join, andThrowErrorIfSourceDataMissingto fail when the source returns no rows- Custom escape sequence rules to replace characters
- Variable placeholders in dataset SQL and layout for dynamic exports
Support for SQL Server 2025, 2022, 2019, 2017, 2016, 2014, 2012 (32/64-bit) and Azure Data Factory
SQL Server 2012–2025
How it works
From the toolbox to your first run.
Pick the source, design the layout, choose the target and split rules, all in one task editor.
Pick tables or queries, then simple or custom layout.
Set the source connection (any ADO.NET or OLE DB connection) and click Select/Edit to choose the tables, views or queries. Use simple mode to export them as-is, or check Use Custom Layout to design complex XML.
- Several objects with
table1|table2or patterns such asSales% RootElementNameandRowElementNamein simple mode- No column metadata to maintain when a table changes

Design nested XML with parent/child relations.
On the Custom Layout tab, add datasets from a table or SQL query, then right-click Mappings to add attributes, elements and document arrays. Each document array joins to its parent dataset, and live preview shows the XML structure.
- Attributes, elements and nested document arrays
- Parent/child joins between datasets (e.g. Customers and Orders)
- Live preview of the generated XML

Save to a file or variable, with GZip.
Choose the target mode, then select the target location with Browse. Decide whether to overwrite existing files or compress output to *.gz. On the XML Options tab, turn on Indent Output and set namespaces, prefix, date format and encoding.
- Target: file path, SSIS variable or file connection
- Namespaces and prefixes (e.g.
ns1:Root) - Skip NULL values and empty nested elements

Split large exports into smaller files.
On the Split Options tab, enable Split By Size/Rows when you do not want one big file, and set a Group By Column to create one file per unique value (for example one file per Country).
MaxSizePerFilein bytes, kb, mb or gb (e.g.10mb)MaxRowsPerFilefor a fixed row count per file- The group-by value becomes the file name suffix

Inside the UI
Key settings, as they appear in SSDT.
Real screens from the Export XML File Task product page. Step through them, or open any shot at full size.
Export XML File Task – Select Source Tables, Queries, Connection
Use simple mode to export selected tables or queries to XML, or custom layout mode for complex XML.
Articles
Worked examples that use Export XML File Task.
Compatibility and requirements
Designed to stay inside your SSIS runtime.
- SQL Server 2012 through 2025, 32-bit and 64-bit
- Windows only, 64-bit OS required. SQL Server Express and Web editions do not include SSIS
- Azure Data Factory SSIS Integration Runtime
- Self-hosted: credentials and data stay in your environment (external API calls still reach that service)
- Fully functional 30-day trial of SSIS PowerPack
FAQ
Questions teams ask before they drop Export XML File Task on the canvas.
What is Export XML File Task?
A Control Flow task in SSIS PowerPack that exports tables, views or SQL query output from relational sources such as SQL Server, Oracle and MySQL to an XML file or SSIS variable. Simple mode exports data as-is; custom layout mode joins multiple datasets (e.g. Customers, Orders, OrderDetails) into nested parent/child XML.
How do I create nested XML from several tables?
Check Use Custom Layout on the Source tab, add a dataset per table or query on the Custom Layout tab, then right-click Mappings to add attributes, elements and a Document Array joined to its parent dataset. The create XML in SSIS tutorial walks through it.
Can I add XML namespaces and prefixes?
Yes. Enter prefix/namespace pairs in Namespaces (e.g. ns1=http://abc.com/schema1,ns2=http://abc.com/schema2) and set Prefix for the root element. See the namespace / prefix guide.
Can it split output into multiple files?
Yes. Enable SplitFiles with MaxSizePerFile (e.g. 10mb) or MaxRowsPerFile, or set GroupByColumn to write one file per column value, with the value used as the file name suffix. Output can also be GZip-compressed.
Which SQL Server versions can I run it on?
SQL Server 2025, 2022, 2019, 2017, 2016, 2014, and 2012 (32- and 64-bit), plus Azure Data Factory with an SSIS Integration Runtime (packages must target SQL Server 2017). See Compatibility and requirements.
Start your free trial today
Install SSIS PowerPack and drag Export XML File Task onto the Control Flow.
Turn tables and queries into simple or nested XML files, then split or compress them, in one Control Flow task.
- Control Flow Task in SSISExport XML File Task appears in the toolbox after you install PowerPack.
- Fully functional 30-day trialSSIS PowerPack, running in your environment.
- Live supportHelp during your trial and after purchase.
Open Help FileBrowse all SSIS PowerPack tasks
New purchases may be eligible for refund review within 30 days. See the refund policy.
Talk to an engineer before or during your trial.