Created
January 26, 2018 21:40
-
-
Save clay584/77ce9f1f5e6b09d9e01b4103595293f2 to your computer and use it in GitHub Desktop.
python xml crap
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
| 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