You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Alkesh Nandanwar <al...@digitalfocus.com> on 2001/01/23 20:53:13 UTC

Html To Xml

hello,

How do I convert html document to xml document. I want to create xsl from
it.

Thanks


Re: Html To Xml

Posted by "Thomas B. Passin" <tp...@mitretek.org>.
You don't even need the <?xml ... declaration.  On the other hand,
depending on you processor and the encoding that was used for the
document, you may have problems with the encoding (oe lack of an
encoding declaration) causing the processor to complain and quit.

You need the dtd for xhtml rather than for "html4".  Be aware that the
html dtd is very big and it may take along time for the processor to
find, load, and process all the parts.

Cheers,

Tom Passin

Christian Laflamme wrote -

> you can just add the 2 following lines at begining of the HTML file
> <?xml version='1.0'?>
> <!DOCTYPE XMI SYSTEM 'HTML4.dtd'>
>
> and change the extension to .xml
> but you also the need the DTD file defining all the tags, otherwise,
you
> won't be able to transform it with XSL files
>
> the HTML file must also be valid, which means, for example, that <P>
must
> closed with </P>, attributes must be inside quotes (<IMG
SRC="image.gif">),
> etc
>
>



Re: Html To Xml

Posted by Christian Laflamme <ch...@silverrun.com>.
Hi,

you can just add the 2 following lines at begining of the HTML file
<?xml version='1.0'?>
<!DOCTYPE XMI SYSTEM 'HTML4.dtd'>

and change the extension to .xml
but you also the need the DTD file defining all the tags, otherwise, you
won't be able to transform it with XSL files

the HTML file must also be valid, which means, for example, that <P> must
closed with </P>, attributes must be inside quotes (<IMG SRC="image.gif">),
etc


Chris

----- Original Message -----
From: "Alkesh Nandanwar" <al...@digitalfocus.com>
To: <ge...@xml.apache.org>
Sent: Tuesday, January 23, 2001 2:53 PM
Subject: Html To Xml


> hello,
>
> How do I convert html document to xml document. I want to create xsl from
> it.
>
> Thanks
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>