TIL: There appear to be different whitespace collapsing rules in XML that – at least some of the parsers we used – don’t agree on. Some appear to expect that <a> </a>
results in an empty string, others don’t. Well, .trim()
it is, I guess.
(I didn’t research any specs on this.)
Or maybe it’s just bugs, of course.
@movq@www.uninformativ.de Yeah, when I had to do XML back in the days, I also stumbled across this. I might mix things up, but when I looked it up (results are long forgotten, though), there were different rules for XML and HTML. And the behavior also changed with whitespace-only content vs. whitespace pre- and suffixes. Some were kept, others weren’t.