Exemple #1
0
def get_ns(ns):
    out_ns = to_unicode(libxml2mod.xmlNodeGetContent(ns))
    # Detect "" and produce None as the empty namespace.
    if out_ns:
        return out_ns
    else:
        return None
Exemple #2
0
def get_ns(ns):
    out_ns = to_unicode(libxml2mod.xmlNodeGetContent(ns))
    # Detect "" and produce None as the empty namespace.
    if out_ns:
        return out_ns
    else:
        return None
 def __getattr__(self, attr):
     if attr == "parent":
         ret = libxml2mod.parent(self._o)
         if ret == None:
             return None
         return nodeWrap(ret)
     elif attr == "properties":
         ret = libxml2mod.properties(self._o)
         if ret == None:
             return None
         return xmlAttr(_obj=ret)
     elif attr == "children":
         ret = libxml2mod.children(self._o)
         if ret == None:
             return None
         return nodeWrap(ret)
     elif attr == "last":
         ret = libxml2mod.last(self._o)
         if ret == None:
             return None
         return nodeWrap(ret)
     elif attr == "next":
         ret = libxml2mod.next(self._o)
         if ret == None:
             return None
         return nodeWrap(ret)
     elif attr == "prev":
         ret = libxml2mod.prev(self._o)
         if ret == None:
             return None
         return nodeWrap(ret)
     elif attr == "content":
         return libxml2mod.xmlNodeGetContent(self._o)
     elif attr == "name":
         return libxml2mod.name(self._o)
     elif attr == "type":
         return libxml2mod.type(self._o)
     elif attr == "doc":
         ret = libxml2mod.doc(self._o)
         if ret == None:
             if self.type == "document_xml" or self.type == "document_html":
                 return xmlDoc(_obj=self._o)
             else:
                 return None
         return xmlDoc(_obj=ret)
     raise AttributeError(attr)
 def __getattr__(self, attr):
     if attr == "parent":
         ret = libxml2mod.parent(self._o)
         if ret == None:
             return None
         return xmlNode(_obj=ret)
     elif attr == "properties":
         ret = libxml2mod.properties(self._o)
         if ret == None:
             return None
         return xmlAttr(_obj=ret)
     elif attr == "children":
         ret = libxml2mod.children(self._o)
         if ret == None:
             return None
         return xmlNode(_obj=ret)
     elif attr == "last":
         ret = libxml2mod.last(self._o)
         if ret == None:
             return None
         return xmlNode(_obj=ret)
     elif attr == "next":
         ret = libxml2mod.next(self._o)
         if ret == None:
             return None
         return xmlNode(_obj=ret)
     elif attr == "prev":
         ret = libxml2mod.prev(self._o)
         if ret == None:
             return None
         return xmlNode(_obj=ret)
     elif attr == "content":
         return libxml2mod.xmlNodeGetContent(self._o)
     elif attr == "name":
         return libxml2mod.name(self._o)
     elif attr == "type":
         return libxml2mod.type(self._o)
     elif attr == "doc":
         ret = libxml2mod.doc(self._o)
         if ret == None:
             if self.type == "document_xml" or self.type == "document_html":
                 return xmlDoc(_obj=self._o)
             else:
                 return None
         return xmlDoc(_obj=ret)
     raise AttributeError,attr
 def get_content(self):
     return libxml2mod.xmlNodeGetContent(self._o)
Exemple #6
0
def Node_nodeValue(node):
    return to_unicode(libxml2mod.xmlNodeGetContent(node))
Exemple #7
0
def Node_nodeValue(node):
    return to_unicode(libxml2mod.xmlNodeGetContent(node))
 def get_content(self):
     return libxml2mod.xmlNodeGetContent(self._o)