{"id":54,"date":"2024-12-17T21:14:49","date_gmt":"2024-12-17T20:14:49","guid":{"rendered":"https:\/\/xmlable.com\/?page_id=54"},"modified":"2025-12-02T22:47:21","modified_gmt":"2025-12-02T21:47:21","slug":"validator","status":"publish","type":"page","link":"https:\/\/xmlable.com\/validator\/","title":{"rendered":"XML Validator"},"content":{"rendered":"\n<style>\n.hidden {  display:none; }\n.editor-container {border: 1px solid gray;}\n.editor-valid, .editor-inprogress {\n    color: green;\n    padding: 8px;\n    background-color: #d0f5a9;\n    margin: 10px 0;\n}\n.editor-error {\n    color: red;\n    padding: 8px;\n    background-color: #f6cece;\n    margin: 10px 0;\n}\n.editor-valid , .editor-error, .editor-inprogress  {\n    width: 99%;\n    margin-right: auto;\n    margin-left: auto;\n}\n\n<\/style>\n<div class=\"row-container\">\n\t<div class=\"row-container-small\">\n\t\t<input type=\"file\" id=\"file-input\" class=\"hidden\"  \/>\n\t\t<div class=\"span\" style=\"text-align:center;\">\n\t\t\t<input type=\"button\" class=\"action-button-editor right\" value=\"Browse\" id=\"browse-xml\" \/>\n\t\t\t<input type=\"button\" class=\"action-button-editor right\" value=\"Copy to clipboard\"  id=\"copy-xml\"\/>\n\t\t\t<input type=\"button\" class=\"action-button-editor right\" value=\"Download\" id=\"download-xml\" \/>\n\t\t<\/div>\n\t\t<div class=\"span\" >\n\t\t\t<div style=\"clear:both\" class=\"editor-container\">\n\t\t\t\t<textarea id=\"editor-container-xml\" class=\"editor\"><\/textarea>\n\t\t\t<\/div>\n\t\t<div id=\"message\" ><\/div>\n\t\t<\/div>\n\t\t<br\/><br\/>\n\t<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to validate an XML file?<\/strong><\/h2>\n\n\n\n<p>Click on \"Browse\" to select your file or copy-paste it directly into the editor.<br>The XML file will be automatically analyzed. If there is a syntax error, it will be highlighted, and an error message will be displayed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why validate an XML file?<\/strong><\/h2>\n\n\n\n<p>The XML format is commonly used in various contexts, such as SOAP web services.<br>It may be necessary to create a payload in XML format, and errors can easily occur. Identifying the syntax error can then be complex, especially if the XML file is large.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Check XML<\/strong><\/h2>\n\n\n\n<p>This tool allows you to test the syntax of an XML file. It detects syntax errors, enabling you to correct them and obtain a valid XML. While it is quite simple, it perfectly serves its purpose (no need for AI ^^).<\/p>\n\n\n\n<p>This tool uses the <strong><a href=\"https:\/\/github.com\/NaturalIntelligence\/fast-xml-parser\/\" title=\"\">fast-xml-parser<\/a><\/strong> library (MIT license).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"api\">API documentation<\/h2>\n\n\n\n<p id=\"block-1e4fe21b-d60d-423b-9112-aa56d36d1223\">This API allows to validate XML data. Please use this API sparingly.<\/p>\n\n\n\n<p id=\"block-f2946daa-70fe-4c1f-86b1-a4f3936e790c\"><strong>POST<\/strong> https:\/\/api.xmlable.com\/xml\/validator<\/p>\n\n\n\n<p id=\"block-ffe3f616-b0dd-41a3-80b9-71591cdc0d4e\">Return the first syntax error<\/p>\n\n\n\n<p id=\"block-ba39079e-2cdf-4059-98d2-c67682468633\"><strong>Payload<\/strong><\/p>\n\n\n\n<pre id=\"block-05234738-beb8-4066-8806-7a279df34d37\" class=\"wp-block-code\"><code>Your XML data<\/code><\/pre>\n\n\n\n<p id=\"block-f855fa07-9e3b-468c-8717-5a28a06c575f\"><strong>Response<\/strong><\/p>\n\n\n\n<p id=\"block-9966154e-b77e-4117-bcff-296c3075ea20\">Success:&nbsp;<strong>200<\/strong><\/p>\n\n\n\n<pre id=\"block-313923d7-3554-4f0d-a6af-cfc4497a2ac2\" class=\"wp-block-code\"><code>{\n    \"valid\": true\n}<\/code><\/pre>\n\n\n\n<p id=\"block-a9181de0-b567-4843-9bf1-a51396ae3282\">Error:\u00a0<strong>400<\/strong><\/p>\n\n\n\n<pre id=\"block-68a99660-14f6-44b1-b3c5-fb6077f841e5\" class=\"wp-block-code\"><code>{\n    \"valid\": false,\n    \"details\": {\n        \"code\": \"InvalidTag\",\n        \"msg\": \"Tag '&amp;aa' is an invalid name.\",\n        \"line\": 3,\n        \"col\": 5\n    }\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to validate an XML file? Click on \u00ab\u00a0Browse\u00a0\u00bb to select your file or copy-paste it directly into the editor.The XML file will be automatically analyzed. If there is a syntax error, it will be highlighted, and an error message<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-54","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/pages\/54"}],"collection":[{"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":7,"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/pages\/54\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/xmlable.com\/wp-json\/wp\/v2\/media?parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}