~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to py/doc/example/genxml.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import py 
 
3
class ns(py.xml.Namespace): 
 
4
    pass 
 
5
 
 
6
doc = ns.books(
 
7
    ns.book(
 
8
        ns.author("May Day"), 
 
9
        ns.title("python for java programmers"),), 
 
10
    ns.book( 
 
11
        ns.author("why", class_="somecssclass"), 
 
12
        ns.title("Java for Python programmers"),),
 
13
    publisher="N.N", 
 
14
    )
 
15
print doc.unicode(indent=2).encode('utf8')
 
16
 
 
17