initial creation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# import xml.etree.ElementTree as ET
|
||||
import lxml.etree as ET
|
||||
|
||||
doc = ET.parse('../DATA/solar.xml')
|
||||
|
||||
jupiter = doc.find('.//planet[@planetname="Jupiter"]')
|
||||
|
||||
if jupiter is not None:
|
||||
for moon in jupiter:
|
||||
print(moon.text) # grab attribute
|
||||
Reference in New Issue
Block a user