Code:
for navpoint in root.xpath('//{namespace}navPoint'):
if test_navpoint_for_removal(navpoint):
p = navpoint.getparent()
p.remove(navpoint)
for child in reversed(navpoint):
p.insert(idx, child)
You'll have to do a bit of monkeying with the text/tail of various elements to preserve indentation, but that's about it.