Searches for the BASE URL. The code should work on both XML
          and HTML document even if base mechanisms are completely
          different. It returns the base as defined in RFC 2396
          sections 5.1.1. Base URI within Document Content and 5.1.2.
          Base URI from the Encapsulating Entity However it does not
           return the document base (5.1.3), use doc->URL in this case

def getBase(self, doc):
        """Searches for the BASE URL. The code should work on both XML
          and HTML document even if base mechanisms are completely
          different. It returns the base as defined in RFC 2396
          sections 5.1.1. Base URI within Document Content and 5.1.2.
          Base URI from the Encapsulating Entity However it does not
           return the document base (5.1.3), use doc->URL in this case """
        if doc is None: doc__o = None
        else: doc__o = doc._o
        ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
        return ret