W3C规范Java校验证器:jcabi-w3c

jopen 7年前

该库包含了W3C在线验证的Java适配器:

public class My {    public void main() {      String xhtml = "<html><body><p>Hello, world!</p></body></html>";      ValidationResponse response =        new ValidatorBuilder().html().validate(xhtml);      assert response.valid();    }  }
public class My {    public void main() {      String css = "body { font-family: Arial; }";      ValidationResponse response =        new ValidatorBuilder().css().validate(css);      assert response.valid();    }  }

项目主页:http://www.open-open.com/lib/view/home/1417482685429