Skip to content

Instantly share code, notes, and snippets.

@clay584
Created January 26, 2018 21:40
Show Gist options
  • Select an option

  • Save clay584/77ce9f1f5e6b09d9e01b4103595293f2 to your computer and use it in GitHub Desktop.

Select an option

Save clay584/77ce9f1f5e6b09d9e01b4103595293f2 to your computer and use it in GitHub Desktop.
python xml crap
import jxmlease
with open('vuln.xml') as xml:
root = jxmlease.parse(xml)
root.prettyprint()
for item in root['solution']['ContainerBlockElement']['UnorderedList']['ListItem']:
print 'URL Link: {}'.format(item['Paragraph']['URLLink'].get_xml_attr('LinkURL'))
print 'URL Title: {}'.format(item['Paragraph']['URLLink'].get_xml_attr('LinkTitle'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment