XML Validation

We list two methods of XML validation. The first uses an XML schema and helps verify that the fields contain valid values. The second is less strict and uses an XML DTD to check that the file has correctly ordered and named tags.

Verify using an XML Schema

Use Kelkoo schema (downloadable from kelkoo.xsd) to verify that the fields contain valid values.

To allow the file to be verified against the schema, you should alter the feed, replacing the XML version and Products tags with this:

<?xml version="1.0"?>
<Products xmlns="http://www.kelkoo.co.uk"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kelkoo.co.uk kelkoo.xsd">

 

Example feed with schema reference: feed-with-schema.xml.

You can then test your new feed using the form below:

  1.  

    Attach the Kelkoo XML Schema (download it from here: kelkoo.xsd)

     

    Attach your local XML feed with schema (this should be similar to our example feed-with-schema.xml)

     

    The above XML tester uses http://tools.decisionsoft.com/schemaValidate.html

    Other schema validators:

  2. Verify using an XML Parser

    Use the kelkoo.dtd to verify that the tags you are using are correctly ordered.

    For Windows:

    1. 1. XML validator plug-in for IE - allows you to validate XML files.
    2. 2. List of XML parsers
    3. 3. Microsoft's Online XML validator (also validates files against schemas)
    4. 4. xmllint (see Unix docs, below for more details)
    5. 5. XML cooktop

    For UNIX:

    • xmllint is included with recent versions of Red Hat, included with libxml2: example command is "xmllint -- dtdvalid kelkoo.dtd file.xml"