Skip to content

Instantly share code, notes, and snippets.

@MartijnBraam
Last active September 21, 2016 13:55
Show Gist options
  • Save MartijnBraam/720845225e9fe431634fa5b14884a341 to your computer and use it in GitHub Desktop.
Save MartijnBraam/720845225e9fe431634fa5b14884a341 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
zooi = '{http://purl.org/rss/1.0/modules/content/}encoded'
import xml.etree.ElementTree as etree
for event, elem in etree.iterparse('test.dat', events=('start', 'end', 'start-ns', 'end-ns')):
if event == 'end' and elem.tag == zooi:
if elem.text:
parsed=elem.text+""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment