When working with data, specially in web development fields, we've all got the chance to handle XML files. It could be a file we created, or an existing file created by someone else. In order to process it we need to verify the data is in a correct XML format.

Use CodVerter's XML Validator to resolve invalid XML issues.

What is XML?

XML (Extensible Markup Language) is a markup language used to store and transport data and is readable by both human and machine. It is a data of elements described by tags. An element can contain a number, a string, a boolean, another element or a combination of all.

<?xml version="1.0" encoding="UTF-8" ?>
<costumer>
  <id>7375</id>
  <firstName>John</firstName>
  <lastName>Black</lastName>
  <streetAddress>12 Grimmauld Place</streetAddress>
  <city>London</city>
  <postalCode>42290</postalCode>
  <country>England</country>
</costumer>

Sample of XML data

Keys for a Valid XML Data

  • Each element must have a closing tag
  • List of more than one element need to be nested inside one root tag
  • If you're adding XML prolog line, it must be the first line in your data:
  • <?xml version="1.0" encoding="UTF-8" ?>

    XML prolog line

  • You can add an empty element (without any content):
  • <tag name> </tag name>

    Empty element with opening and closing tag

    <tag name />

    Empty element with self-closing tag

CodVerter's XML Validator

Our XML Validator will test your XML's validity. If it's not valid, the tool will show you the matching error message. Insert XML data to the input editor and press "Convert". If your XML is valid you can choose how to display it:

  • Pretty XML - data is displayed with indentions and with new lines after closing tags
  • Mini XML - data is displayed in one line without indentions


We hope you find this useful. Feel free to contact us and to join CodVerter's community.

Let's CodVert!