> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fexco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate an XML I-file before submission

> Validate your XML I-file against the XSD schema before uploading it to Fexco.

Every XML I-file must be valid against Fexco's XSD (XML Schema Definition) schema before you
submit it to Fexco via Secure File Transfer Protocol
([SFTP](https://docs.fexco.com/dcc/guides/getting-started/security-setup.md#secure-file-transfer-sftp)). If the file
contains structural errors, the entire file is rejected and none of the transactions in
it are processed. Validating locally catches these errors before they reach Fexco, saving
you a round trip.

## Before you start

You need a completed XML I-file ready for validation. See
[Build and submit an XML I-file](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/xml-i-file.md)
for how to build one.

## Structural errors versus data errors

The I-file processor handles two categories of errors differently.

| Error type | What happens | Example |
| :- | :- | :- |
| Structural or syntactical error | The entire file is rejected. No transactions are processed. | A missing closing tag, an element in the wrong order, or a missing required attribute like `schemaVersion`. |
| Data error on an individual transaction | The file is accepted. Valid transactions are processed, and invalid ones are reported in the response file. | An unrecognized merchant ID or an invalid currency code. |

Validation against the XSD catches structural and syntactical errors
before submission. Data errors (such as an unrecognized merchant or
mismatched acquirer) are only detected during server-side processing
and appear in the response file.

## Reference the XSD in your XML file

Your XML file must include the required namespace and schema version in the root element.

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<iFile
    xmlns="http://www.fexco.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.fexco.com ifile_v25.2.0.xsd"
    schemaVersion="25.2.0"
    fileSequenceNumber="1"
    disposition="test">

  <!-- merchant and transaction data here -->

</iFile>
```

> [!WARNING]
>
> Omitting the `schemaVersion` attribute or the namespace declaration causes
> the file to be rejected without any per-transaction error detail.

## Validate with the online validator

Paste your XML or upload a file to check it against the I-file XSD
schema rules. Results appear instantly with no software installation
required.

### XML I-file validator

Validates against I-file XSD schema (v25.2.0)

Upload file

> [!NOTE]
>
> You can also validate your file using any XML validator that
> supports XSD schema validation. If you do not have the XSD file, contact your Fexco
> project manager or email [FMSservicedesk@fexco.com](mailto:FMSservicedesk@fexco.com).

## Next steps

* [Build and submit an XML I-file](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/xml-i-file.md):
  return to the full I-file guide to submit your validated file.
* [Troubleshoot transaction import](https://docs.fexco.com/dcc/guides/transaction-import/troubleshoot.md):
  resolve per-transaction data errors that appear in the response file
  after submission.
* [XML I-file format](https://docs.fexco.com/dcc/developer-resources/file-formats/xml-i-file.md):
  look up the full XSD schema source and field specifications.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.