I've used HXT with the tagsoup backend for parsing HTML with embedded JavaScript. Worked fine for me, although I don't think I've ever had to deal with CDATA embedded in comments of scripts. You can have a look at the source of the 'jespresso' library on hackage if interested.

On 12/24/2013 11:03 PM, akira kawata wrote:
Hi, I am Akira.
I want to parse HTML file that is contain javascript.
But I cant come up with how to deal with script tag.
Is there anyone help me?

Details of probrem
HTML code I want to parse is like following

<html>
<script>
//<![CDATA[
<!-- -->
//]]>
</script>
</html>

Because '<' is used as normal character in the script region,
I can not use my HTML parser there.



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe