Feed Validator Web Service API

The W3C Feed Validator exposes its Web service as a SOAP 1.2 interface, which you can use in your own applications.

Table of Contents

Terms of Use

  1. When processing batch of documents, You MUST wait at least 1 second between each request.
  2. Authentification for W3C Markup Validation service is NOT REQUIRED.

Validation Request Format

Below is a table of the parameter you can use to send a query to the W3C Feed Validator.

If you want to use W3c's public validation server, use the parameters below in conjunction with the following base URI:
http://validator.w3.org/feed/check.cgi .


Note: If you wish to call the validator programmatically for a batch of documents, please make sure that your script will sleep for at least 1 second between requests. The Feed Validation service is a free, public service for all, your respect is appreciated. thanks.

ParameterDescriptionDefault value
url The URL of the document to validate None, but either this parameter, or uploaded_file, or fragment must be given.
rawdata The source of the document to validate. Full documents only. At the moment, will only work if data is sent with the UTF-8 encoding. None, but either this parameter, or uri must be given. You should also set parameter manual to 1 to use direct input validation.
output triggers the various outputs formats of the validator. If unset, the usual Web format will be sent. If set to soap12, the SOAP1.2 interface will be triggered. See below for the SOAP 1.2 response format description. unset

SOAP format description

When called with parameter output=soap12, the validator will switch to its SOAP 1.2 interface (experimental for now). Below is a sample response, as well as a description of the most important elements of the response.

sample SOAP 1.2 validation response

IMPORTANT: this output is still new, and may be changed in the future. Should this happen, this documentation will be updated and the changes listed below.

A SOAP response for the validation of a document (invalid) will look like this:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
          <text>Missing channel element: description</text>

SOAP1.2 response format reference

markupvalidationresponse The main element of the validation response. Encloses all other information about the validation results.
uri the address of the document validated. Will (likely?) be upload://Form Submission if an uploaded document or fragment was validated. In EARL terms, this is the TestSubject.
checkedby Location of the service which provided the validation result. In EARL terms, this is the Assertor.
doctype Detected (or forced) Document Type for the validated document
charset Detected (or forced) Character Encoding for the validated document
validity Whether or not the document validated passed or not formal validation
errors Encapsulates all data about errors encountered through the validation process
errorcount a child of errors, counts the number of errors listed
errorlist a child of errors, contains the list of errors (surprise!)
error a child of errorlist, contains the information on a single validation error.

Note: warnings, warningcount, warninglist and warning, as well as informations, infocount, infolist and info are similar to, respectively, errors, errorcount, errorlist and error.

SOAP1.2 atomic message (error or warning) format reference

As seen as the example above, the children of the error element, but also the warning element are line, col and message, defined below:

line Within the source code of the validated document, refers to the line where the error was detected.
col Within the source code of the validated document, refers to the line where the column was detected.
text The actual error/warning/info message
msgcount How many times this message was encountered
element element in the feed where the message was triggered
parent In the feed, parent of the element
value if applicable the value of the element, attribute or content which triggered the message

Code Libraries

Another way to access this Web Service is through code libraries. At this moment, there are already two libraries created to access this service:

If you have built a library for another language, send a message to the www-validator public mailing-list, and we will add it to the list here.