|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.protocol.http.documentvalidation.HtmlDocumentValidator
public class HtmlDocumentValidator
Simple class that provides a convenient programmatic way to define what an expected HTML document should look like and then to validate a supplied document against this template. Note that this validator expects very clean HTML (which should not be a problem during testing). In particular it expects tags to be matched and that the following tags with optional close tags are actually closed: p, td, th, li and option.
Constructor Summary | |
---|---|
HtmlDocumentValidator()
Create the validator. |
Method Summary | |
---|---|
void |
addRootElement(DocumentElement e)
Add a root element to the validator. |
boolean |
isDocumentValid(String document)
Check whether the supplied document is valid against the spec that has been built up within the validator. |
void |
setSkipComments(boolean skipComments)
Set whether to skip comments of not when validating. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HtmlDocumentValidator()
Method Detail |
---|
public void addRootElement(DocumentElement e)
e
- The element to addpublic boolean isDocumentValid(String document)
document
- The document to validate
public void setSkipComments(boolean skipComments)
skipComments
- Whether to skip comments or not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |