To help processing of files using the schema described above, we provide a Python module that reads and writes XML. To use this module, you must have these files in the current directory:
birdnotes.py: The principal Python
rnc.py: A module containing
symbolic names for all the element and attribute names
from the schema.
All the program and data files required for the
taxonomy package, A
system for representing bird taxonomy:
rnc_txny.py, and one of the AOU Check-List
Once these files are installed, your Python script must import it with a line like this:
from birdnotes import *
Here is the general flow of a program that reads notes using this module:
Txny object representing
aou.xml file defining the
desired taxonomic arrangement of birds.
passing it the
For each XML file you want to read, call the
.readFile() method on the
The interfaces to the
BirdNoteSet class and
the various other classes are defined in separate sections
below. Here is a diagram showing the classes and their
relationships, except for
Txny which is
external to this module.
In addition to the classes shown above, two classes are used throughout the structure to represent mixed content as defined in Section 5.15, “The narrative elements”.