Registered: Aug, 2004
Re: Odd idea
Posted: Oct 24, 2005 9:45 AM
I'm not an unrestricted fan on XML, but I have a few observations.
The primary reason people like text (either plain or XML) over binary data formats is the fact that so many developers barfed up a disgustingly ugly, messy hairball when they created their binary data formats.
Text isn't immune to crappy data formats anymore than binary. Some text formats are good, others are pretty bad.
Quite a few developers barfed up a disgustingly ugly, messy hairball when they created their -text- data formats.
>> - it is a mature format
> text: YES
> XML: not really, it's still evolving
Sorry; have to object. Text isn't a data format, anymore than binary is a data format. The format is the additional meta-information that structures the data. XML provides -some- of the rules for doing this, but not all; as you mention, it's still evolving, and it's free-form enough to allow multiple representations of the same data.
You -can- format text according to a number of mature, tested methods. But that isn't the "text" format; that's the xxx format, which is encoded in plain text.
That's true of the next few comments. I feel your point would be better phrased as "you don't need somthing as complex and verbose as XML do achieve [blank], and if you do so using other, rather traditional methods, you'll get better results."
I tend to agree with that.
>> - it can be easily extended
> text: infinitely
> XML: yes, as long as the extensions are described
And that's really the laudable goal of XML. I don't think it -achieves- that goal. But it tries, and the goal is laudable. I think structuring the syntax of XML to -require- unambiguous representation and simpler parsing rules is one of the worthwhile things about it.
>> - it is robust (i.e. works with partial information)
> text: yes
> XML: not in my experience -- parsers crash and burn
> on bad XML XML is inherently more fragile than text
> because there is a lot more to go wrong
Well, this is a choice, like whether the application should core-dump on an error or try to recover. For some applications, failing to render partial or defective information is the right thing to do.
You're right about the verbosity of XML offering more opportunities for failure.
> ...how bad a home-grown solution would be in
> comparison. Most non-trivial data representation
> formats that are hand-rolled are riddled with
> bugs, ambiguities, and often lead quickly down
> a road to incompatible versions from every vendor.
> That pretty much describes the state of XML today.
> Everyone is rolling their own using a more bloated