Skip to main content

Transaction Manager - [ERROR] Unable to export transaction. Error: 'WriteXmlRow(): Token StartElement in state Epilog would result in an invalid XML document.'

Resolves the 'WriteXmlRow(): Token StartElement in state Epilog would result in an invalid XML document.' error when exporting multiple Flat File transactions simultaneously in Transaction Manager.

Written by John Kaminsky

Product: Transaction Manager


Issue: When exporting multiple Flat File transactions simultaneously in Transaction Manager, the following error is received:

'Unable to export transaction. Error: 'WriteXmlRow(): Token StartElement in state Epilog would result in an invalid XML document.''

Reason: The Flat File export is configured to use Single File mode, which attempts to combine multiple transactions into one file. When exporting multiple transactions at the same time, this causes an invalid XML structure — the system attempts to write additional records after the XML document has already been closed, resulting in this error.


Solution — Update Flat File Options in Transaction Setup


Update the Flat File Options setting for the affected document type from Single File to Distinct Files within the Trading Partner's Transaction Setup.

Navigate: Transaction Manager → Trading Partners → (Select Trading Partner) → Transaction Setup

Select: The Export File Names tab

Locate: The affected document type under the Flat File Options column

Set: Change Single FileDistinct Files

Retry: Re-export your transactions


Solution — Update Flat File Options in Business System


Alternatively, the Flat File Options setting can be updated at the Business System level under the Export File Type Names section.

Navigate: Transaction Manager → Business System → (Select Business System)

Locate: The Export File Type Names section

Find: The affected document type under the Flat File Options column

Set: Change Single FileDistinct Files

Retry: Re-export your transactions


Additional Resources


rev 07/27/2026

Did this answer your question?