On a deeper level, the element/attribute distinction unnecessarily mucks up the data model, but I'm not sure how big a problem that is in practice.
What's frustrating with XML?
11–20 of 28 posts
Re: What's frustrating with XML?
#12Many of the really crappy aspects of XML have been thoroughly abstracted away by libraries. I'm of the opinion that you can only truly despise XML if you've tried to write a parser for it yourself.
Examples of the issues: It requires arbitrary lookahead & backtracking. There is no canonical document encoding. (Support arbitrary character encoding for content: great idea! Support arbitrary encoding for the metadata/XML itself: The opposite of a great idea.) Entity references: need I say more?
There's a reason this sort of thing keeps coming up: http://voices.washingtonpost.com/securityfix/2009/08/researc...
XML as it would be in an ideal world would be (a) simple and (b) unambiguous; it fails both.
All that said, there's a huge benefit in the whole world arriving at a somewhat standard way of doing things, and a lot of that benefit remains even if the standard itself really sucks.
Re: What's frustrating with XML?
#13Re: What's frustrating with XML?
#14If you convert your JSON data to XML (assuming it is structured in a way that makes it lossless) you have a whole lot more useful tools at your disposal.
Re: What's frustrating with XML?
#15Rather than encode what menu item is in what pseudo-folder, it encodes every change made to the menu system as a diff and expects the applications will piece these together -- and the libraries that parse this monstrosity all huffily say "this code is NOT stable...".
http://standards.freedesktop.org/desktop-entry-spec/latest/
Of course, this isn't so much XML's fault as the fault of the folks who kludged together this monstrosity. This shows, however, how XML is more or less a tool for knitting together two or more generally poorly-specified encodings. The good is that these might be somewhat better inside XML than running about wild but the bad is it lets them continue to exist all. See Microsoft's Office XML "standard".
Re: What's frustrating with XML?
#16The problem with JSON is that isn't very useful by itself because you always have to encode and decode it, and then analyze the structure to do something with the data. It works better as part of a protocol, not as a native data format. If you convert your JSON data to XML (assuming it is structured in a way that makes it lossless) you have a whole lot more useful tools at your disposal.
Re: What's frustrating with XML?
#17Closed as subjective and argumentative. Darn, I wanted to pick a fight there. ;) Many of the really crappy aspects of XML have been thoroughly abstracted away by libraries. I'm of the opinion that you can only truly despise XML if you've tried to write a parser for it yourself. Examples of the issues: It requires arbitrary lookahead & backtracking. There is no canonical document encoding. (Support arbitrary character…
Or had to work with any of the utterly terrible xml dialects out there, which represents about 90% of them first and foremost xslt and xsd. Or had to deal with the various bugs in parsers, or with most people's (and software's) complete and utter inability to correctly deal with xml namespaces.
Re: What's frustrating with XML?
#18Closed as subjective and argumentative. Darn, I wanted to pick a fight there. ;) Many of the really crappy aspects of XML have been thoroughly abstracted away by libraries. I'm of the opinion that you can only truly despise XML if you've tried to write a parser for it yourself. Examples of the issues: It requires arbitrary lookahead & backtracking. There is no canonical document encoding. (Support arbitrary character…
I had to interface with a government system at some point. They shipped us a whole schema of custom elements such as "IsShipment" (for example) which extended bool to allow extra options. All this was clearly documented in the schema comments "You can use 'true', 'false', 'sortof', and 'mostly'." So we go to validate the data.... and it doesn't validate. Against their schema. Because they didn't extend bool, they just said they did in the comments. When we got back in touch with them, we realized that they had no clue that the stuff not in comments mattered. As far as they knew, XML was just text, and they had clearly specified how it was to be interpreted (in English).
Re: What's frustrating with XML?
#19Closed as subjective and argumentative. Darn, I wanted to pick a fight there. ;) Many of the really crappy aspects of XML have been thoroughly abstracted away by libraries. I'm of the opinion that you can only truly despise XML if you've tried to write a parser for it yourself. Examples of the issues: It requires arbitrary lookahead & backtracking. There is no canonical document encoding. (Support arbitrary character…
XML isn't bad in and of itself. It's just a powerful, neutral format. The problem with XML is that it allows so much abuse. I had to interface with a government system at some point. They shipped us a whole schema of custom elements such as "IsShipment" (for example) which extended bool to allow extra options. All this was clearly documented in the schema comments "You can use 'true', 'false', 'sortof', and 'mostly'.…
And if JSON tends to be used where integration isn't very challenging (eg. you control both ends, and the data is fairly regular and simple; or one end is entirely determined by the other); that is, where schemas aren't needed.
Re: What's frustrating with XML?
#20Closed as subjective and argumentative. Darn, I wanted to pick a fight there. ;) Many of the really crappy aspects of XML have been thoroughly abstracted away by libraries. I'm of the opinion that you can only truly despise XML if you've tried to write a parser for it yourself. Examples of the issues: It requires arbitrary lookahead & backtracking. There is no canonical document encoding. (Support arbitrary character…