To see how xmlvalidation.com works, copy or download the XML file. It contains a reference to an XSD file, which you will also need to copy from below or download and enter into the webpage (in a second step, when you are prompted for it) to see the validation results.
Recommendation:
You can always edit the files by just clicking on the appropriate links at the bottom of the page, which is nice for correcting errors and then downloading the validated, error-free files.
<?xml version="1.0" encoding="UTF-8"?>
<addresses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='test.xsd'>
<address>
<name>Joe Tester</name>
<street>Baker street 5</street>
<wrongExtraField/>
</wrongClosingTag>
</addresses>
|
|
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name="addresses">
<xs:complexType>
<xs:sequence>
<xs:element ref="address" minOccurs='1' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="address">
<xs:complexType>
<xs:sequence>
<xs:element ref="name" minOccurs='0' maxOccurs='1'/>
<xs:element ref="street" minOccurs='0' maxOccurs='1'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type='xs:string'/>
<xs:element name="street" type='xs:string'/>
</xs:schema>