Chapter Recap

What was new in this chapter?

  • Tidying HTML/XML markup

  • Piping output to standard error with 2>

  • The Web Accessibility Initiative

  • The <=> method and the Comparable module

  • Processing XML with REXML and XML::DOM::Builder

  • Manipulating XML documents with regular expressions

  • Making Hashes out of Arrays with inject

  • Hashes serving as histograms

  • Mapping Procs onto Arrays

  • The Document Object Model

  • The begin and rescue keywords

That’s it for our XML-processing scripts. I hope these example scripts are not only useful in and of themselves but that they also might give you ideas about how you could modify or extend them to suit new tasks other than those presented here. For now, we’ll proceed to our next chapter, Chapter 9. As the name suggests, its scripts ...

Get Ruby by Example 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.