Tip | ||||
---|---|---|---|---|
On this page:
|
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.
- 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
Finding the TPN Manager
Company Details
Opening Messages
Choose your Message Type
Finding the Validate Format function
Uploading your message
Checking your message is valid
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 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.
Info |
---|
For more information on XML validation please see: Validate with simulator |
HTML |
<div id="uploadFormatDialog" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-shadow ui-hidden-container ui-draggable" style="width: auto; height: auto; left: 728px; top: 354px; z-index: 1003; display: block;" role="dialog" aria-labelledby="uploadFormatDialog_title" aria-hidden="false" aria-live="polite"><div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-top ui-draggable-handle"><span id="uploadFormatDialog_title" class="ui-dialog-title">Upload XML File</span></div><div class="ui-dialog-content ui-widget-content" style="height: auto;"> <form id="formatDialogForm" name="formatDialogForm" method="post" action="validateXML('formatDialogForm:j_idt1326')" enctype="multipart/form-data" style="margin: 20px 10px 10px 10px;"> <input type="hidden" name="formatDialogForm" value="formatDialogForm"> <span id="formatDialogForm:j_idt1306:messages"> </span><input type="file" name="formatDialogForm:j_idt1326" title="Upload XML"><button id="formatDialogForm:submitButton" name="formatDialogForm:submitButton" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" onclick="" type="submit" role="button" aria-disabled="false"><span class="ui-button-text ui-c">Submit</span></button> <input type="hidden" name="javax.faces.ViewState" value="-8688770182512489187:-4700583280267253600" autocomplete="off"></form></div></div> |