15.1. Parsing XML with REXML
XML (which “looks like” HTML or SGML) has been popular since the 1990s. It does, in fact, have some good qualities that make it preferable to fixed-column data storage. For example, the fields are given specific names, the overall design makes a hierarchical structure possible, and most of all, it allows variable length data.
Four decades ago, of course, memory constraints would have rendered XML largely impractical. But imagine it had been introduced then. The infamous “Y2K” problem gained much press in 1999 (though it turned out to be more of a nuisance than a problem), but with XML, it would not have shown up on anyone’s radar. There was a Y2K issue solely because most of our legacy data was stored and manipulated ...
Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.