initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python
# import xml.etree.ElementTree as ET
import lxml.etree as ET
doc = ET.parse('../DATA/solar.xml') # <1>
inner_nodes = doc.findall('innerplanets/planet') # <2>
outer_nodes = doc.findall('outerplanets/planet') # <3>
print('Inner:')
for planet in inner_nodes: # <4>
print('\t', planet.get("planetname")) # <5>
print('Outer:')
for planet in outer_nodes: # <4>
print('\t', planet.get("planetname")) # <5>