Пример #1
0
 def get_content(self, upper=True, as_string=True):
     if as_string:
       if len(self.content) == 1:
           return xml_util.clean(self.content[0], upper=upper)
       else:
           return ""
     else:
       return map(functools.partial(xml_util.clean, upper=upper), self.content)
Пример #2
0
 def get_content(self, upper=True, as_string=True):
     if as_string:
         if len(self.content) == 1:
             return xml_util.clean(self.content[0], upper=upper)
         else:
             return ""
     else:
         return map(functools.partial(xml_util.clean, upper=upper),
                    self.content)
Пример #3
0
 def get_attribute(self, key, upper=True):
     return xml_util.clean(self._attributes.get(key, None), upper=upper)
Пример #4
0
 def get_attribute(self, key, upper=True):
     return xml_util.clean(self._attributes.get(key, None), upper=upper)
Пример #5
0
 def get_content(self):
     if len(self.content) == 1:
         return xml_util.clean(self.content[0])
     else:
         return map(xml_util.clean, self.content)
Пример #6
0
 def get_attribute(self, key):
     return xml_util.clean(self._attributes.get(key, None))