Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
New function
  • Loading branch information
Klaus Thoden committed Aug 30, 2018
1 parent 11533e0 commit 8ecac47
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fix_tei.py
Expand Up @@ -54,6 +54,19 @@

TMP_DIR = os.path.expanduser("tmp_files")

def get_place_in_xml_tree(element, tree):
"""Find out the position of an element in a tree.
Return the index. Example: how to insert an element after a specific
element
"""

xml_children = tree.getchildren()
position = xml_children.index(element)

return position
# def get_place_in_xml_tree ends here

def parse_bibtex(bibfile):
"""Parse the bibtex file, return a dict"""

Expand Down

0 comments on commit 8ecac47

Please sign in to comment.