Convert Your HTML To XML And XHTML
Did you know you can convert your HTML to XHTML and allow your website visitors to subscribe to your content with RSS? Maybe you knew that but didn’t know how. Well, it’s really not difficult if you have the right Search Engine Optimization tools.
First, the difference between XHTML and XML …
XML stands for Extensible Markup Language. It does not, like HTML display data on a screen. Rather, it carries data from one place to another. That’s why it is used for RSS feeds. Another difference between XML and HTML is that you have to define your own tags. They are not predefined.
You can’t just convert your HTML documents to XML and be done. You don’t throw away the HTML once the conversion takes place. You still need the HTML so that site visitors can see the data that they are subscribing to. The XML file is used to transport the file to the subscriber once they’ve decided to subscribe. Then they will be able to read it in HTML again in its final destination.
XHTML stands for Extensible Hypertext Markup Language. Unlike XML, it is designed to replace HTML. That means, when you do create your XHTML document, you no longer need the HTML so you can throw it away. It is almost like a hybrid. While it looks like HTML, it is much cleaner than HTML and is also has the properties of an XML file. So your visitors can read the XHTML file in their browser while it sits on your server, just like an HTML page, AND they can subscribe to it and read it in its final destination just like an XML file. XHTML is essentially the equivalent to the latest version of HTML – HTML 4.01.
So the question is, how do you convert your standard HTML documents to XML or XHTML? Well, you need one simple open source software solution and it will do all the work for you. It’s called HTML TIDY. There is a GUI version and a Command Prompt version. I recommend the GUI version as all you have to do is upload your HTML document and TIDY will do the conversion in a second. The Command Prompt version requires a little bit of memorization and finger work. You can download the GUI version of TIDY here.
After you convert your information to XHTML, all you have to do then is provide your visitors with a way to subscribe to your feed that will help drive visitors and Search Engine Optimization. And that’s it. Simple.




Please tell me, what does XHTML have to do with RSS-feeds?? and how is converting your HTML to XHTML going to help your users subscribe to your RSS-feed?
If you want to extract data from any page of a website, you don’t need to convert this page to XHTML but if you can parse it as XML it will be very easy to do.
If you want to integrate such extracted data in your own web site, you need an object or a function to do that.
That’s why I have written such a function for PHP5 (http://sourceforge.net/projects/light-html2xml).
I have just downloaded it..though I still need to check on its accuracy to convert a document..I used dreamweaver to convert html 4.01 to xhtml 1.0 but the accuracy is too low. I had to do lot of manual changes..
Thanks Abbas for sharing your situation and your comment!