Quantcast
Channel: Find occurrence using multiple attributes in ElementTree/Python - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by chmullig for Find occurrence using multiple attributes in...

This depends on what version you're using. If you have ElementTree 1.3+ (including in Python 2.7 standard library) you can use a basic xpath expression, as described in the docs, like...

View Article



Answer by Santa for Find occurrence using multiple attributes in...

You'll have to iterate through the <testcase /> elements that you have, like so:from xml.etree import cElementTree as ET# assume xmlstr contains the xml string as above# (after being fixed and...

View Article

Find occurrence using multiple attributes in ElementTree/Python

I have the following XML.<?xml version="1.0" encoding="UTF-8"?><testsuites tests="10" failures="0" disabled="0" errors="0" time="0.001" name="AllTests"><testsuite name="TestOne"...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images