HP3000-L Archives

February 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Rob McDougall <[log in to unmask]>
Reply To:
Rob McDougall <[log in to unmask]>
Date:
Fri, 18 Feb 2000 15:34:48 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
First, let me point out that I *am* an XML zealot, but I hope you'll listen
to what I have to say anyway :).

One of the benefits of XML that has not been expounded upon is the fact that
it's a well thought out "standard" format.  Let's take Wirt's QCTerm file
format as an example:

>
>             TelNetAddr1 = 192.168.1.1
>             TelNetAddr2 = 209.181.113.217
>             TelNetAddr3 =
>             TelNetAddr4 =
>             TelNetAddr5 =

Now what happens when you want a name/value pair where the value contains
line breaks?  You now have to add some sort of special mechanism that allows
you to continue on the next line (let's say we use \ character).  After
you've added that you then have to have some way of getting a \ character
into the data.  Ok, you say that if you see two \ characters in a row, that
is interpreted as one, etc.

I've seen too many different file formats that all have there own individual
quirks.  Often the developer has not properly thought out the consequences
of their "special characters" and has not devised an appropriate escaping
mechanism.

Personally I would use XML for almost any data I store outside a database
(including configuration files, etc.).  Why?  Because it's a standard.  You
get all the "standard" (*smirk*) benefits:

1) It saves me documentation.  I don't have to explain the underlying
mechanics of the format I just say "it's XML".  Immediately, the person (if
they are familiar with XML) knows how to escape special characters.  If they
don't know XML, well then they've got some reading to do, but they're better
prepared the next time I give them a new type of XML file.

2) It saves me coding.  I can pick a standard parser off one of numerous web
sites and use it to parse my file.  This saves both in duplication of code
and in bugs (there are less likely to be bugs in a parser that a lot of
people are using).

3) It saves me design time.  The format is already well thought out
including issues such as character escaping and internationalization.  I
don't have to worry about these things because the XML WG has already
worried about them for me.

Rob

ATOM RSS1 RSS2