Re: [OVC-demo-team] BRP update

From: David Mertz <voting-project_at_gnosis_dot_cx>
Date: Fri Mar 05 2004 - 23:03:20 CST

>> ballots. I really haven't had a chance to examine the existing XML
>> I/O API
>> yet, only having put code stubs in place in my code thus far. If
>> someone
>> could simply summarize the API, that will help save me time. What
>> would be
>> *extremely* helpful would be a collection of sample ballot.xml files,
>> all
>> with randomly different values that I can test through the BRP.
> One of the sources I've found useful for Python in general is Dive Into
> Python ( which was
> mentioned on this list earlier. There's an XML section at
> that may be of use
> to you. It doesn't do a very good job at describing how to do DOM or
> XPath however. PyXML ( might be a good
> path. I'm sure David and others can give much better pointers on this.

What I have recommended before--and continue to recommend now--is to
use my public domain library gnosis.xml.objectify to read XML files.
It's not bad even as speed goes (much faster than DOM, for example),
but most importantly, it is absolutely transparent to use. After one
line that calls 'make_instance()', an XML data structure appears as a
native Python object, with nested object attributes matching the tag
names from the XML.

The Architecture document:

contains an example of using gnosis.xml.objectify. The Architecture is
a bit out of date in terms of no longer containing precisely the XML
format that is current (and the code example was from back when we
thought we'd use wxPython). But I think one glance at the usage will
illustrate the simplicity.

Dred Scott 1857; Santa Clara 1876; Plessy 1892;
Korematsu 1944; Eldred 2003
= The content of this message, with the exception of any external 
= quotations under fair use, are released to the Public Domain    
Received on Thu Apr 1 02:40:24 2004

This archive was generated by hypermail 2.1.8 : Thu Apr 01 2004 - 02:40:36 CST