ProjectPythonSourceForge
Welcome
Introduction
Suitability
Future Plans
Setup
Downloading XMLObject
Installing XMLObject
XMLObjApp
The XMLObjApp Application
Classes
Special Attributes
XML Attributes
UniqueID and ReferenceID
Constraining XML Attributes
Child Tags
VCD Strings
Configuring a Typical Child Type
Configuring a #PCDATA Child Type
Configuring an <XML> Child Type
File Menu
Saving and Loading
Sanity Test
Import XML...
Preferences...
File->Quit
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

The XMLObjApp Application

XML can be used to represent almost any kind of data you can imagine. So before XMLObject can translate your XML into Python objects, you need to "teach" it the XML structure to expect and how you would like to access that data. This is done by creating a parser specifically tailored to your XML.

Sound tough? Don't worry. This project includes a program called XMLObjApp which will create the parser code for you.

Figure 3.1. XMLObjApp

XMLObjApp

The application is laid out in a fairly straight-forward manner. Each notebook tab across the top represents one class that the parser may instantiate. Typically, each type of tag that might appear in your XML file will get its own class, and therefore, its own notebook tab. Clicking on a tab will bring you to the definition for that class.

The class name and type are defined at the top of the notebook page.

Special attributes are defined in the next section of the notebook page.

The middle region allows you to define which XML attributes may appear for the given tag.

The bottom region allows you to specify which children the tag may have. The syntax is akin to a regular expression.