I have this code in the xml view:
<field name="fueled" sum="Sum of fueled"/>
How can I get value sum attribute to do some calculating in python file?
Just do this:
from lxml import etree
etree.fromstring('<field name="fueled" sum="Sum of fueled"/>').xpath('//field/@sum')[0]