[lxml-dev] Problem with XMLSchema and attribute_defaults
Frank Millman
frank at chagford.com
Mon Apr 27 11:33:06 CEST 2009
Hi all
I need to validate an xml document with a schema, and at the same time
populate it with any default attributes. This works correctly with minixsv,
but it is rather slow, so I am trying lxml. It validates correctly, but I
cannot get it to load the default attributes.
This is what I am doing -
schema = etree.XMLSchema(file='bpmnxpdl_31.xsd')
parser = etree.XMLParser(schema=schema, attribute_defaults=True)
root = etree.parse('order.xml', parser)
Any assistance will be appreciated.
Thanks
Frank Millman
More information about the lxml-dev
mailing list