3 ms·
In what contexts would those two snippets of XML be treated differently? (Not that I am jumping in to defend XML I'm just curious).
by arethuza 17y ago
In what contexts would those two snippets of XML be treated differently? (Not that I am jumping in to defend XML I'm just curious).
- eli 17y agoIf you wrote code to crawl the tree generated from that XML, you'd have text nodes (of whitespace) in one, but not the other.
- arethuza 17y agoThat's what I thought - I don't think I've ever seen an application that would bother with that difference.
- DrJokepu 17y agoYou're using that application right now - XHTML takes the difference into consideration. Consider the <pre /> tag: <pre><b>Hello!</b></pre> is rendered differently from <pre> <b>Hello!</b> </pre>
- arethuza 17y agoGood point! :-)
- Khaki 17y agoThe difference is a big deal to applications that use XML as a markup language (marking up documents and text), as it was designed to do originally.