XML Matters, The REXML library
XML processing in the Ruby programming language
From the developerWorks archives
Date archived: May 15, 2019 | First published: March 01, 2002
There are at least two attitudes you can have towards XML processing. One is to adopt standard APIs that can be called from many programming languages. A second is to tailor an XML processing library to the specific strengths of the programming language you are using to develop an XML application. In earlier installments of this column, David looked at versions of the second approach with his own Python
xml_objectify, and with the Haskell
HaXml library. A commonly-used library for the fairly new, but rapidly growing Ruby programming language also takes the second approach. Here, David introduces Ruby Electric XML (
REXML), a library that takes the strengths of Ruby, and builds XML processing around them.
REXML has analogs for the stream-style of SAX and the tree-style of DOM, but restricts itself to neither API directly.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.