You are here: XML parsing and HTML comments « PHP Programming Language « IT news, forums, messages
XML parsing and HTML comments

Posted by Colin McKinnon on 09/13/05 15:27

Hi all,

I find myaelf writing a template system (yeah, I know - but there is a
reason I'm not using an existing one). So I'm trying to parse xhtml using
the builtin expat parser. Mostly it works fine, however it ignores anything
that looks like an HTML comment. This is a bit of a problem as I see a lot
of code written like:

<script type='text/javascript>
<!--
alert("hello world');
// -->
</script>
<style type="text/css">
<!--
..style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>

Now obviously the browser is seeing the stuff inside '<!--' ...'-->' but
expat doesn't. I tried adding a non-parsed handler, but still can't see it.

Anybody fixed this?

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация