Validate html code with node.js [closed]
Asked Answered
G

0

6

I want to validate some HTML documents in a node.js application. I already found some node.js modules like w3cjs and w3c-validate, but it seems that they are only working online. Because I have to check many small HTML documents, I'm searching for a solution that works offline, without internet.

Do you know how to integrate the W3C Markup Validator in a node application? Or what are other ways to check HTML syntax? Maybe something like a DOM parser?

Grubman answered 22/2, 2015 at 1:51 Comment(7)
Have you tried - github.com/mozilla/html5-lint ?Piceous
Thanks for fast reply. No I haven't tried yet. On the first look at html5-lint I found "Python front-end to the Mozilla Labs' HTML Validator Web Service". So it does not seem to work offline, right? RegardsGrubman
No ..on the github page...there is node.js usage...Piceous
I just implemented a short example with the html5-lint module in nodejs. Yes it works but it needs internet for working. I am searching for a solution that works without internet. Thank you!Grubman
The validator schema is in internet...so it is using that. If we find something with using net..i will update..Piceous
PhantomJS as an HTML ValidatorEloiseloisa
Take a look at htmllintSickler

© 2022 - 2024 — McMap. All rights reserved.