[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Drop toplevel XML-comments in libxml-parse-(xml|html)-region?
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Drop toplevel XML-comments in libxml-parse-(xml|html)-region? |
Date: |
Tue, 11 Nov 2014 20:13:42 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Ulf Jasper <address@hidden> writes:
> Out of interest: Why preserve xml/html comments at all except for
> re-generating an XML document?
In HTML it's necessary because you often include things that "aren't
supposed" to be parsed in comments.
Like
<!--
<script>
foo()
</script>
-->
For the JS stuff, it doesn't really matter much to us since we don't
execute it, but when doing web scraping to get data from a page, you
sometimes see commented-out bits that has to be re-parsed as HTML to get
the bit you're looking for.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no