2

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?

0

1 Answer 1

0

Just do this:

from lxml import etree etree.fromstring('<field name="fueled" sum="Sum of fueled"/>').xpath('//field/@sum')[0] 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.