Beispiel #1
0
 def _transform(
     self,
     token_generator: str,
     operation: Operation,
     element: etree.ElementBase,
 ):
     value = ''.join(element.itertext())
     if not value:
         return
     element.clear()
     element.text = transform(value, operation, token_generator)
Beispiel #2
0
 def _transform(self, operation: Callable, element: etree.ElementBase):
     value = ''.join(element.itertext())
     if not value:
         return
     element.clear()
     element.text = operation(value)