[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Sucks
On Monday, May 5, 2003, at 10:50 US/Central, Mike Kozlowski wrote: > That's precisely what I don't want to do. The best thing about XML > configuration files is that I already know the syntax -- I don't need > to > remember whether it's #, //, or ; that marks a comment, whether I need > a > special character at the end of every line, what character I use to > quote > strings, how I do escaping, or anything. With XML files, the syntax is > standard and universal. Agreed, but I think you're missing another huge benefit: the syntax is not only well-known but _complete_ and _correct_. When people invent their own file formats, they tend to omit details like escaping stuff. XML has well-known ways of doing this. For example, look at Adium's log files. (Adium is a great IM program for OS X.) It's a really simple format: timestamp, sender, message, newline. I.e.: (HH:MM:SS)sender:message But there's no escaping done on the message. So what happens when you paste Adium logs into an Adium window? Well, the new logfile is ambiguous. There's no good way to distinguish this from each of those messages being sent. You can guess based on the timestamp and sender, but that's silly. XML has solved this problem: the escaping is well-known. Not only that, but SAX serializers do the escaping for you easily just by using ContentHandler.characters(). XSLT correctly handles escaping whether you put stuff as content or attributes, which places it in the minority of template formats. This is a better way of doing things: when you have to manually escape stuff, you will eventually forget. These do things correctly by default. You'd have to work to screw it up. Anyway, this discussion is kind of silly. I don't think many people on this list have to be sold on XML. Scott
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|