Re: [xml] RE: HTML Parser: Choking on quoted HTML tags in javascript?



On Thu, Apr 28, 2005 at 10:51:04AM +0200, Cyrill Osterwalder wrote:
Yes, I compeletely agree with both of your resonses. However, the application
that produces this HTML is a commercial Web app that I cannot change. I try
to get along other "errors" by using the libXML parser and dealing with it.

Maybe you could just change every "<script>" to "<script><![CDATA[" 
and every "</script>" to "]]!></script>" with sed/awk/perl before
passing the code to libXML parser. I am not sure HTML parsing API of
libxml understands "<![CDATA[", then maybe HTML comments will work
instead.

Greets,
        Jacek



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]