4 ms·
HTML uses a ton of SGML features not part of XML (sometimes erroneously though to be non-standard ‘tag soup’, not to mention self-closing tags). You need eithe
by gldrk 1y ago
HTML uses a ton of SGML features not part of XML (sometimes erroneously though to be non-standard ‘tag soup’, not to mention self-closing tags). You need either a specialized parser or an SGML processor + DTD.
- shawn_w 1y agoWasn't HTML4 the last one defined as a SGML DTD? 5 and on is its own beast. (rip XHTML)
- gldrk 1y agoYou are right. There is a third-party DTD that should be mostly compatible (https://sgmljs.sgml.net/docs/html5.html https://sgmljs.sgml.net/docs/html5.html). In reality, HTML4 was never implemented to the letter by user agents, because people do things like putting -- inside comments.