I need tool to perform a batch conversion of around 200 HTML files into XHTML.
I understand that HTML tidy can be used for this task, and I came up with this:
Code:
tidy --wrap 99999 -c -meq --output-xhtml true file.html
For some reason, this doesn't work. In particular, it doesn't close tags that don't have end tags in HTML. I just get back pretty much what I started with, with a few blank paragraphs removed.
I've tried removing the <DOCTYPE> tag, and using various permutations of --output-xml and --as-xml, but all to no avail.
What am I doing wrong? Or can someone suggest a better utility?