vCard

I’ve been playing with the vCard format for a project at work and I gotta say, there’s a technology that’s begging to be re-implemented in XML. I mean, here’s the behind-the-scenes formatting of a vCard file:

BEGIN:VCARD
FN:Mr. John Q. Public, Esq.
N:Public;John;Quinlan;Mr.;Esq.
BDAY:1995-04-15
ADR;DOM;HOME:P.O. Box 101;Suite 101;123 Main Street;Any Town;CA;91921-1234;
TEL;PREF;WORK;MSG;FAX:+1-800-555-1234
END:VCARD

…with a bunch of arcane rules for delimiters and encoding. Uh, hello? EDI? 1989 called, and it wants its format back.

Wouldn’t something like this XML mockup of the same thing just make more sense?

<vCard>
  <name>
    <family>Public</family>
    <given>John</given>
    <additional>Quinlan</additional>
    <prefix>Mr.</prefix>
    <suffix>Esq.</suffix>
    <formatted>Mr. John Q. Public, Esq.</formatted>
  </name>
  <dob>1995-04-15</dob>
  <address>
    <type>Domestic, Home</type>
    <po>P.O. Box 101</po>
    <extended>Suite 101</extended>
    <street>123 Main Street</street>
    <locality>Any Town</locality>
    <region>CA</region>
    <postalCode>91921-1234</postalCode>
  </address>
  <telephone>
    <preferred />
    <type>Work, Message, Fax</type>
    <number>+1-800-555-1234</number>
  </telephone>
</vCard>