Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lBaah authored Oct 29, 2019
1 parent f643459 commit 4710870
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spawnTagRemove.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import xml.etree.ElementTree as ET
tree = ET.parse('spawn.xml')
root = tree.getroot()

#remove npc spawn from spawns.xml
spawns = root.findall('spawn')
for spawn in spawns:
npcs = spawn.findall('npc') # change to monster to select monster
for npc in npcs:
spawn.remove(npc) # remove npc tag from spawns.xml
tree.write('out.xml') # write a new file without selected tags

0 comments on commit 4710870

Please sign in to comment.