Forum Moderators: open

Message Too Old, No Replies

HTML to xml and xsl

Create xml and xsl file from a html file.

         

Jaya

9:12 am on Jun 17, 2002 (gmt 0)

10+ Year Member



I need to create the xml and xsl from an existing html file on the fly. Is this possible? Is anybody aware of this? Please do let me know.

I searched in the web and I found .exe files which does the conversion. But I need to do this dynamically. For eg. I have an html file with plain text - may be a report kind of thing. I need to read the contents of the html file and generate the respective xml and xsl.

Note: Since the html file may contain some reports, the html file will vary for different types of reports and hence the xml and xsl will also change respectively.

Any help appreciated.

bill

9:37 am on Jun 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This probably isn't exactly what you are looking for, but HTML Tidy [w3.org] will convert your HTML to XHTML...

korkus2000

11:52 am on Jun 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why are you going backwards? Usually you want to create HTML on the fly from XML so you use XSLT. Why even create xsl when going from HTML to XML?

What you want should be no problem in any scripting language since HTML tags are set. You need to set up a style sheet that will follow your formatting rules for each html tag it will encounter.

What language are you using server side?

If you ment going XML to XSL to HTML then you can use saxon, msxml4, or xt for processing xsl.

Jaya

12:32 pm on Jun 17, 2002 (gmt 0)

10+ Year Member



I have worked on conversion of xml and xsl to HTML and it works fine. But I want the reverse of it. I need to convert the HTML into xml & xsl.

I am using JSP.

fashezee

12:46 pm on Jun 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what are the benefits of XML and XHTML?