ProjectPythonSourceForge
Welcome
Introduction
Suitability
Future Plans
Setup
Downloading XMLObject
Installing XMLObject
XMLObjApp
The XMLObjApp Application
Classes
Special Attributes
XML Attributes
Child Tags
File Menu
Miscellaneous Operation Notes
Unicode and ASCII Strings
Manually Editing Your Parser
Outputting XML
XMLObject
XMLObject -- XML to Object Conversion
Stack -- Tracks the Document Hierarchy
All Docs on One Page

Classes

When you first run the XMLObjApp, the application will construct a simple class called Root to get you started. Your top-most class does not have to be called Root. In fact, the best name for this class is simply the tag name itself, or "AddressBook" in our example.

Use Class->New (Ctrl-N) to create a class for each type of tag that can appear in your XML file. Class->Delete deletes the current class, but be careful! There is no undo.

Figure 3.2. XMLObjApp Class Menu

XMLObjApp Class Menu

Directly beneath the notebook tabs are form fields for the class name and an optional parent class name. The class name must be unique and a valid Python identifier, so don't include any punctuation in the class name.

If you wish to derive the class from another class, you may enter the parent class name in the appropriate field. Don't worry about defining the parent class just yet. We can do that later by editing the parser source code.