code: def parse_singular_int(t, tag_name):
      '''Parses the sole integer value with name tag_name in tag t. Heavy-handed with the asserts.'''
      pos = t.getElementsByTagName(tag_name)
      assert(len(pos) == 1)
      pos = pos[0]
      assert(len(pos.childNodes) == 1)
      v = pos.childNodes[0].data
      assert(v.isdigit()) # no floats allowed
      return int(vf parse_singular_int(t, tag_name):
      '''Parses the sole integer value with name tag_name in tag t. Heavy-handed with the asserts.'''
      pos = t.getElementsByTagName(tag_name)
      assert(len(pos) == 1)
      pos = pos[0]
      assert(len(pos.childNodes) == 1)
      v = pos.childNodes[0].data
      assert(v.isdigit()) # no floats allowed
      return int(v)
docs: Parses the sole integer value with name tag_name in tag t. Heavy-handed with the asserts.