Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 31f25c3687ae280d7aae49073301a340 > files > 639

python3-pyxb-1.2.6-2.mga7.noarch.rpm

from __future__ import print_function
import pyxb
import po4
import address
import pyxb.binding.datatypes as xs

po = po4.purchaseOrder(orderDate=xs.date(1999, 10, 20))
po.shipTo = address.USAddress('Alice Smith', '123 Maple Street', 'Anytown', 'AK', 12341)
po.billTo = address.USAddress('Robert Smith', '8 Oak Avenue', 'Anytown', 'AK', 12341)
po.items = pyxb.BIND(pyxb.BIND('Lapis necklace', 1, 99.95, partNum='833-AA'),
                     pyxb.BIND('Plastic necklace', 4, 3.95, partNum='833-AB'))

print(po.toxml("utf-8").decode('utf-8'))