Counting Elements in an xml file

Ouray Viney oviney at gmail.com
Sat Aug 30 13:37:13 EDT 2008


Hi All:

I am looking at writing a python script that will let me parse a
TestSuite xml file that contains n number of TestCases.

My goal is to be able to count the <TestCase> elements base on a key
value pair in the xml node.

Example

<Testcase execute="true" name="foobar">

I would like to be able to count the number of TestCases that contain
the "execute=true" but not the ones that contain "execute=false".

I have review the python docs and various python ebooks.

Does anyone have any experience with this sort of thing?  If so, could
you suggest a good library and possibly some samples?

Thanks



More information about the Python-list mailing list