Created
May 28, 2020 22:10
-
-
Save wpjunior/1757eee436e06177ecdf5ff4bb422173 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse(sys.argv[1]) | |
root = tree.getroot() | |
nfe = root.findall("{http://www.portalfiscal.inf.br/nfe}NFe")[0] | |
icms = nfe.findall('.//{http://www.portalfiscal.inf.br/nfe}ICMS70/{http://www.portalfiscal.inf.br/nfe}vICMS') | |
for i in icms: | |
print(i.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment