Convert from HTML to XML With HTML Tidy
An anonymous reader writes "HTML Tidy, a powerful tool to help convert old HTML pages to newer standards, such as XML. This tip demonstrates how to convert HTML documents to XML (or more specifically, XHTML) with a simple, open source tool. This conversion is useful for webmasters who are migrating to XML. It can also help XML converts who have to interface with legacy HTML tools."
A few days ago I had to convert HTML pages into XHTML, stripping out a few extra elements and attributes. I used xsltproc, from libxslt , which uses the parser from libxml2 , and this has the option of parsing strict HTML into an XML DOM.
XMLTidy can be useful when you have a not-so-strict HTML, but for most quick conversions I've found libxml2 &co to be quite light and easy.
dakkar - mobilis in mobile
HTML Tidy has been our for years.
Check out the Tidy Homepage or the project on SourceForge.
Popisms.com - Connecting pop culture
It's extremely useful for converting the "HTML" generated by Microsoft Office products into nice, clean, well formatted XHTML.
Popisms.com - Connecting pop culture
Again, it's converted to XHTML for a few years. I only posted the original message because I was quite surprised to see it on Slashdot. It's not uncommon to see a story that is a month or two old on the homepage, but several years old is crazy.
Popisms.com - Connecting pop culture
Ian Hickson makes a good case here that using XHTML may not be the right direction to go -- at least at this point.
- say that I use XHTML
- make it easier to parse my pages
HTML 4.01 doesn't make you expressly close your tags, which causes XML processors to choke and die. I'd rather write it in a usable format once than have to Tidy-parse every time I want to update my search engine. Plus XSLT really is cool. I've got (somewhere) a stylesheet I wrote that will validate form data for me and then I can apply other xslt stylesheets to make the output, further seperating the output from the script that does the magic. Great way to update the look of a page without messing up (accidentally, of course) the code I wrote months ago.If you are running MacOS with BBEdit, you can use the BBTidy plugin to get HTML Tidy integration in BBEdit.
JP
The date for the referenced article is 18 Sep 2003, less than two weeks ago.
Larry
4 years. I remember it being implemented before the XHTML recommendation was final. I remember it particularly because I've been using XHTML on my website since I converted it, then, in 1999, with HTML-Tidy.
Well, from the W3C page on HTML 4.01
Given that information, I would put the form outside the table element, since the table controls the layout of the form. Besides, shouldn't that be part of tidying up code?
Overrated / Underrated : Moderation