Chapter 5. First-class functions in action with XML

This chapter covers

  • First-class and higher order functions

  • Python decorators

  • Reading and writing XML

  • An XML file format for MultiDoc

In the previous chapter, we started creating a multipage document editor called MultiDoc. The aim is to create a desktop application that can load and save multipage documents stored in a single file. In this chapter, we show the implementation of a core part of this specification: the ability to save and load multipage documents stored as XML. You’ll add new load and save commands to MultiDoc, using classes in the System.Xml assembly. In the process, we’ll explore an extensible approach to reading XML with IronPython.

One of the big differences between Python and traditional ...

Get IronPython in Action 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.