XML Writer in wxPython
Tim Roberts
timr at probo.com
Wed Jan 18 01:52:13 EST 2006
"Marco Meoni" <meonimarco at gmail.com> wrote:
>
>Could you post an example please?
Not really; it depends on what it is you're writing.
def PrintAddress( last, first, address, city, state, zip ):
print " <address>"
print " <lastname>%s</lastname>" % last
print " <firstname>%s</firstname>" % first
print " <address1>%s</address1>" % address
print " <city>%s</city>" % city
print " <state>%s</state>" % state
print " <zip>%s</zip>" % zip
print " </address>"
print "<addresses>"
for row in addressDatabase:
PrintAddress( row.last, row.first,
row.address, row.city, row.state, row.zip )
print "</addresses>"
You can see how an HTML templating aid could help here.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list