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

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -