3 ms·
>Not to mention editors that happily show "<tag\>" while in reality the file reads "<tag></tag>" I believe you mean tag/ as every parse I know of would choke o
by bryanrasmussen 5y ago
>Not to mention editors that happily show "<tag\>" while in reality the file reads "<tag></tag>"
I believe you mean tag/ as every parse I know of would choke on tag\.
if it is tag/ the XML spec says there is no difference between these two scenarios, thus most tools and libraries will serialize as tag/ (I say most because maybe somebody silly somewhere did differently)
- Per_Bothner 5y agoThe difference between <tag></tag> and <tag/> is important if you're trying to write "polyglot" xml/html that can be parsed by either an xml parser or an html parser. For example <br></br> is not valid HTML, but a plain <br> is not valid XML. However <br/> works as either. On the other hand, an empty span has to be written <span></span>.