Re: How to use parse-xml-fragment with a string that contains a less-than symbol (and the less-than symbol is not part of a start- or end-tag)?

"Michael Kay [email protected]" <[email protected]> Mon, 22 Feb 2021 17:38:56 -0000
Newsgroups gmane.text.xml.xsl.general.mulberrytech
Message-ID <[email protected]>
> 
> Is there an elegant, simple solution to this problem, without manually changing <![endif] to &lt;![endif]?
> 

The elegant solution is to use a parser designed for the grammar of the language you are trying to parse, not some other grammar of which that is a bastardised version.

But a simple solution? No, you've got me there. TagSoup probably. Available in Saxon as saxon:parse-html(). But I've no idea what it does with these pseudo-tags.

Michael Kay
Saxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--