dev-shrubb3ry/MuonKit.W3cValidationClient
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
The validator class has two dependencies, `IHttpClient` and `IResponseParser`.
To use the default ones:
var validator = new W3CValidator(new HttpClient(), new Soap12ResponseParser());
Then call `ValidateUri` or `ValidateDocument`
var validationReport = validator.ValidateDocument(@"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><title>test</title></head><body><p>hello</p></body></html>");
The return validation report contains all the info from the validator.