最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to use the w3c validator API - Stack Overflow

programmeradmin4浏览0评论

W3C has an API for their html validator (see .html). But I am confused as to how it is used. I would like to be able to call this as Ajax in jquery and have the information from the validator passed back to me in a variable.

How can I go about doing this?

Thanks

W3C has an API for their html validator (see http://validator.w3/docs/api.html). But I am confused as to how it is used. I would like to be able to call this as Ajax in jquery and have the information from the validator passed back to me in a variable.

How can I go about doing this?

Thanks

Share Improve this question asked Nov 30, 2013 at 16:32 user2970037user2970037 432 silver badges6 bronze badges 1
  • There's not documentation around a RESTful API, but I you could experiment with the following request format: http://validator.w3/check?uri=http%3A%2F%2Fwww.w3 and see what you get back and whether that's digestible. Otherwise SOAP seems heavily supported. – eebbesen Commented Nov 30, 2013 at 16:43
Add a ment  | 

2 Answers 2

Reset to default 8

Maybe this is a possible update:

In previous answers and ments only a SOAP API was mentioned, which is however, as described here, outdated.

A possibility to use the new(?) API is described here:

https://validator.w3/nu/?doc=https%3A%2F%2Fwww.w3%2F&out=json

Maybe someone can confirm this.

Unfortunately, you have to set up a proxy to do this due the cross-domain restriction.

How to call SOAP WS from Javascript/jQuery

发布评论

评论列表(0)

  1. 暂无评论