Source code for heimpt.tools.scripts.stripTitleNumbering
#!/usr/bin/python
import sys, copy
from xml.etree import ElementTree
for child in root:
if child.tag == 'body':
for sec in child.iter('sec'):
for title in sec.iter('title'):
if title.text != stripped:
title.set('class', "numbered")
title.text = stripped.lstrip(" \t")
print(ElementTree.tostring(root))