O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Item 46. Tidy Up Your HTML

Converting HTML to XHTML often exposes and corrects bugs in web pages that you didn't realize were there, especially if you didn't test each page in several dozen browsers. It also makes it much easier to write software to search or modify the pages. And it makes it much easier to write software that processes the pages. For example, I converted my Cafe au Lait and Cafe con Leche web sites to XHTML solely so I could use a simple XSLT stylesheet to generate RSS feeds. The alternative to moving the pages to XHTML would have been installing a complicated, database-backed content management system that completely changed my workflow.

There are three steps to converting HTML to XHTML.

1.
Add the appropriate document type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required