Skip to content

Instantly share code, notes, and snippets.

@stevedoyle
Created November 18, 2014 20:35
Show Gist options
  • Save stevedoyle/63244ddba02d2347d0d9 to your computer and use it in GitHub Desktop.
Save stevedoyle/63244ddba02d2347d0d9 to your computer and use it in GitHub Desktop.
Use xpath to find all nodes of a given name
from lxml import objectify
tree = objectify.parse(tcx_file')
root = tree.getroot()
root.xpath('//ns:HeartRateBpm', namespaces={'ns': 'http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment