Validator.nu Web Service Interface
Validator.nu can be called as a Web service. This page documents how.
For most Web service use cases, you should probably POST the document as the HTTP entity body.
- Document URI as a GET parameter; the service retrieves the document by URI over HTTP or HTTPS.
- Document POSTed as the HTTP entity body; parameters in query string as with GET.
- Document POSTed as an
application/x-www-form-urlencodedform field value.
- Document POSTed as a
- Document in a
data:URI as a GET parameter.
When using Validator.nu as a Web service back end, the XML and JSON output formats are recommended for forward compatibility. The available JSON tooling probably makes consuming JSON easier. The XML format contains XHTML elaborations that are not available in JSON. Both formats are streaming, but streaming XML parsers are more readily available. XML cannot represent some input strings faithfully.
- HTML with microformat-style
classannotations (default output; should not be assumed to be forward-compatibly stable).
- XHTML with microformat-style
&out=xhtmlto URL; should not be assumed to be forward-compatibly stable).
- XML (append
- JSON (append
- Human-readably plain text (append
&out=textto URL; should not be assumed to be forward-compatibly stable for machine parsing).
- GNU error format (needs a better spec)
- Relaxed-compatible (lacks a spec)
- Unicorn-compatible (hoping that Unicorn changes instead)
- W3C Validator-compatible SOAP (legacy)
- EARL (not implemented; domain modeling mismatch)