Click to See Complete Forum and Search --> : Convert HTML to XML-file with stylesheet


henrik79
09-06-2005, 03:34 AM
Hi!

Is it possible to convert a HTML/XHTML-file to a XML-file with a stylesheet?

Any free tools?

Charles
09-06-2005, 06:10 AM
What exactly is an HTML/XHTML file? If it's XHTML then you can use Xalan (http://xml.apache.org/xalan-j/) to process the file with the stylesheet. If it's HTML then you'll want to use Tidy (http://sourceforge.net/projects/tidy) to first translate it into XHTML.

henrik79
09-06-2005, 07:22 AM
What exactly is an HTML/XHTML file?

HTML or XHTML.

If it's XHTML then you can use Xalan (http://xml.apache.org/xalan-j/) to process the file with the stylesheet. If it's HTML then you'll want to use Tidy (http://sourceforge.net/projects/tidy) to first translate it into XHTML.

I do not have a stylesheet. Does Xalan creates one?

Can I create, from xhtml, a xml file that looks the same in a browser?

Charles
09-06-2005, 08:10 PM
1) The style sheet is the instructions and you have to write them yourselves. The processor simply follows those instructions.

2) XHTML is XML, which is why it is not compatable with HTML.

henrik79
09-07-2005, 05:31 AM
Altova Stylevision seems to do the job, but it's rather expensive