I have an xml schema that indicates the default value for an optional field ...
<xs:element name="expiry" type="xs:positiveInteger" default="86400"/>
I am using lxml to parse incoming xml ...
root = lxml.etree.XML(xml)
When I search for an optional element and it does not exist, I get the result "No" ...
expiry = root.findtext('expiry')
How do I get the expiry default value for the default schema (86400)?
source
share