Skip to content

Instantly share code, notes, and snippets.

@GTimothee
Created June 14, 2018 10:20
Show Gist options
  • Save GTimothee/3c51919451dba6a05cbde06de6260102 to your computer and use it in GitHub Desktop.
Save GTimothee/3c51919451dba6a05cbde06de6260102 to your computer and use it in GitHub Desktop.
from lxml import etree
def getSifts(xmlFilePath):
doc = etree.parse(xmlFilePath)
pags = doc.xpath('//PAG')
pag = pags[0]
sifts = pag.xpath('SIFTMATCHER')
return sifts
for sift in sifts :
tagBranch = sift.attrib['tag_branch']
blocs = sift.xpath("./BLOC")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment