Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
 def get_attribute(self, key, upper=True):
     return xml_util.clean(self._attributes.get(key, None), upper=upper)
Exemplo n.º 4
0
 def get_attribute(self, key, upper=True):
     return xml_util.clean(self._attributes.get(key, None), upper=upper)
Exemplo n.º 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)
Exemplo n.º 6
0
 def get_attribute(self, key):
     return xml_util.clean(self._attributes.get(key, None))