summaryrefslogtreecommitdiff
path: root/examples/manual/demo2.py
blob: 74b0895ede5a3bc734931e534809a75757fbc5a0 (plain)
1
2
3
4
5
6
7
import po2

order = po2.CreateFromDocument(file('po1.xml').read())

print '%s is sending %s %d thing(s):' % (order.billTo.name, order.shipTo.name, len(order.items.item))
for item in order.items.item:
    print '  Quantity %d of %s at $%s' % (item.quantity, item.productName, item.USPrice)