in reply to Re: best way to change xml record using XML::Simple?
in thread best way to change xml record using XML::Simple?
That said, I do agree delimited files can make a lot of sense for lightweight data storage. For information that normally wouldn't contain internal whitespace other than "regular" (ASCII 32) spaces -- and this application might qualify -- I often choose tab-delimited.
One potential benefit I do see to using XML in this application is that you can easily store data that isn't quite so regular. For example, if you wanted to support multiple contact phone numbers, it would be fairly easy to expand the data structure like this:
<record> <!--existing stuff--> <contact_phone_number note="business">123-4567</contact_phone_number> <contact_phone_number note="pager">555-6789</contact_phone_number> <contact_phone_number note="vacation home in Bermuda">+1-99-20-55-6789 +</contact_phone_number> </record>
Dealing with irregularities like that would be a bit more work in a rigid db-like or non-hierarchical file format.
$perlmonks{seattlejohn} = 'John Clyman';