3 ms·
He makes some good points that I didn't consider when first I hated upon XML. I agree that XML is better for its problem domain than s-expressions, but in that
by jodrellblank 18y ago
He makes some good points that I didn't consider when first I hated upon XML. I agree that XML is better for its problem domain than s-expressions, but in that case the whole article is an apples to oranges comparison.
He claims that syntax is important, otherwise we'd still be using binary formats. If that's true then the only reason syntax is important is for humans, because machines can read binary formats just as well as anything else. So why compare it to s-expressions instead of to a human-friendly ideal? Is XML the best human-friendly markup language possible? Yes his paragraph is similarly readable in both forms, but would it be if wrapped in XML namespace clauses and an XML Schema? Would the s-expression version be if wrapped in a macro to parse text outside quotes as significant text?
The purpose of XML shouldn't be to make everything more XML-y, but to make everything easier. Maybe it does, in big enterprisey systems and between large data silos. Look at the recent ODF v. Office XML file formats. Have any of you been tempted to process Microsoft Office documents directly because now they're XML they must be easier than the old binary formats?
It's still not human friendly - you can't use the Jabber protocol by hand over telnet like you can use POP3, SMTP, IRC.
- 11ren 18y ago> you can't use the Jabber protocol by hand over telnet like you can use POP3, SMTP, IRC. There's an intriguing view that text can't be used by hand either - you have to use a "text shell". Wouldn't a fair comparison use an "XML shell"? If it knew the schema, it could even autocomplete/intellisense for you, showing you the available choices at that point... it's pretty cool how XML has factored out the grammar of a language, in a reusable way. I don't know the Jabber protocol, but the difficulty I've experienced with web-based XML protocols (web services) is that the http header needs the length of the message, which is hard to do by hand - it's not due to XML (and a "http shell" would fix that...)
- hassy 18y agohttp-twiddle mode for Emacs is handy for tinkering with web-based XML stuff: http://github.com/hassy/http-twiddle/ http://github.com/hassy/http-twiddle/
- michaelneale 18y agoI have found using a lib to process MS document formats from binary is easier then direct XML. The XML formats look more like a memory dump then a marked up document.
- cgranade 18y agoWell, that's OOXML. MS chose to employ the pure content model, so that text nodes and elements cannot be mixed as children of a root element. That leads to monstrosities like this (I forgot the actual element names, so I made them up): <p> <t>This is not bold.</t> <t><b>This is.</b></t> <t>This isn't.</t> </p> In a mixed content model schema, you could omit the extraneous <t> elements and just directly embed text nodes: <p> This is isn't bold. <b>This is.</b> This isn't either. </p> That's just one of the many ways in which MS misused XML to make things worse instead of better.
- michaelneale 18y agoActually yes, now you mention it it was Open Office XML. In any case you still need a library to help you out, its really not that easy to go straight to the XML (at least for the casual user - I guess for implementers its another matter).