Java API that can verify whether a HTML document is well-formed or not -


this question has answer here:

is there java api within maven repository can parse html document , verify if well-formed or not?

update:

the code in program looks this:

    url = "c:/users/user1/desktop/testhtml.html";     fileinputstream fi = new fileinputstream(url);      tidy tidy = new tidy();     //tidy.setquiet(true);     tidy.parse(fi, null);     //tidy.parsedom(fi, fo);     int tempwarnings = tidy.getparsewarnings();     int temperrors = tidy.getparseerrors();` 

the contents on html file this:

<html> <head>     <title>this sample doc</title> </head> <body>     <p> <b>this sample paragraph</b></p> 

however tidy doesn't give warnings or errors when doctype , missing.

yes, jtidy in maven....

it library few html related activities.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -