3 ms·
I remember working a lot with XML a decade ago. XML was large and clumsy and had problems like undefinable ordering of elements for instance. And I haven't actu
by BurnGpuBurn 5y ago
I remember working a lot with XML a decade ago. XML was large and clumsy and had problems like undefinable ordering of elements for instance. And I haven't actually encountered a single parser library that did not have some strange issue which made it behave outside the spec. Not to mention editors that happily show "<tag\>" while in reality the file reads "<tag></tag>". Good luck debugging the parser with that one. My bad experience with the XML standard is probably the reason why I never bothered with XHTML. Sure, cool idea, but XML, so meh.
- 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>.
- NackerHughes 5y ago> undefinable ordering of elements Could you elaborate a bit more on that? By my understanding, order of elements in XML is significant, and child elements are kept in an ordered list.