mas pruebas y algunos pequenos cambios

FossilOrigin-Name: 02bc90719bb17216a749568086887a7d27878fdbd81febfb88a9fb1e68aa8205
This commit is contained in:
bit4bit
2021-08-09 00:21:03 +00:00
parent 64b312a432
commit efe93ecc3c
4 changed files with 73 additions and 34 deletions

View File

@@ -257,6 +257,9 @@ class FachoXML:
def get_element_text(self, xpath, format_=str):
xpath = self.fragment_prefix + self._path_xpath_for(xpath)
elem = self.builder.xpath(self.root, xpath)
if elem is None:
raise ValueError('xpath %s invalid' % (xpath))
text = self.builder.get_text(elem)
return format_(text)