---
title: "XML schema validation"
canonical: "https://knowledge-hub.onetrail.com/space/docs/718700613/XML%20schema%20validation"
format: markdown
---
# Validating your XML

## How to Validate and XML

An XML file must follow strict formatting rules, having no errors in your XML message allows our systems to automatically handle your message.  
There a few different ways to ensure your XML message is formatted correctly.

- Using the Onetrail TPN™ Validator.
- Using your own validation tools.
- Using online XML validation tools.

## Using the Onetrail TPN™ Validator

How to find the Onetrail TPN™ Validator:

- Go to the [Onetrail TPN Portal Dashboard](https://apps.onetrail.net/TPN-Portal/#/secure/dashboard).
- Navigate to the TPN Manager ( located on the top right of the page ).
- On the 'Company Details' page, use the left side panel and choose 'messages'.
- Choose the type of message you'd like to validate your message against from the list of message types.
- Navigate to the 'Validate Format' tab.
- A button will appear at the bottom of the left side panel called 'Validate Format'.

How to use the Onetrail TPN™ Validator:

- Click the 'Validate Format' button.
- A popup will open.
- You can now browse locally for your XML message, once you've selected the correct file, the file name will display.
- Click the 'Submit' button.
- Allow for a few seconds, the list behind the popup will update.
- In the 'Results' column, you'll see a red 'X' or a green check mark indicating whether your file is or is not valid.


### Onetrail TPN™ Validator Image Guide

1. <span style="color: #707070">**Finding the TPN Manager**</span>> Macro (inline-media-image)
2. <span style="color: #707070">**Company Details**</span>> Macro (inline-media-image)
3. <span style="color: #707070">**Opening Messages**</span>> Macro (inline-media-image)
4. <span style="color: #707070">**Choose your Message Type**</span>> Macro (inline-media-image)
5. <span style="color: #707070">**Finding the Validate Format function**</span>> Macro (inline-media-image)
6. <span style="color: #707070">**Uploading your message**</span>> Macro (inline-media-image)
7. <span style="color: #707070">**Checking your message is valid**</span>> Macro (inline-media-image)


## Using your own validation tools

An alternate method of validation there are certain applications that support this sort of function. The most popular of these is Notepad++, it comes standard on most Windows PC's.  
To use this function:

- Open Notepad++.
- Open your XML message or paste the XML contents into the editor.
- Navigate to the 'Plugins' options tab.
- Choose XML tools.
- Click validate now.
- If the message Syntax isn't valid a popup will explain where the error is.
- If the Syntax is valid then a popup will open asking for an XSD (XML Schema file).
- Go to [Messages](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718700580) and download the XSD that corresponds to your message.
- Select that XSD in the popup on Notepad++.
- Click 'OK' and Notepad++ will check the validity of your message against the Onetrail format for that message.


## Using online XML validation tools

Another alternative validation method is to use an online tool, there are loads available online. a simple google search for 'XML validation tools' should bring up a plethora of results for you to choose from.


> ℹ️ For more information on XML validation please see: [Validate with simulator](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718700761)