diff --git a/gis_metadata/utils.py b/gis_metadata/utils.py index d121888..586cfdf 100644 --- a/gis_metadata/utils.py +++ b/gis_metadata/utils.py @@ -170,7 +170,7 @@ def get_xpath_branch(xroot, xpath): """ :return: the relative part of an XPATH: that which extends past the root provided """ if xroot and xpath and xpath.startswith(xroot): - xpath = xpath.replace(xroot, '') + xpath = xpath[len(xroot):] xpath = xpath.lstrip(XPATH_DELIM) return xpath