code: def getInterfacesFromXML(xmlStr, replaceKnownInterfaces=False):
      
      handler = IntrospectionHandler(replaceKnownInterfaces)
  
      xmlStr = xmlStr.strip()
      if xmlStr.startswith('<!DOCTYPE'):
          xmlStr = xmlStr[xmlStr.find('>') + 1:]
  
      # xml.sax.parseString( xmlStr, handler )
      p = xml.sax.make_parser()
      p.setFeature(xml.sax.handler.feature_validation, False)
      p.setFeature(xml.sax.handler.feature_external_ges, False)
      p.setContentHandler(handler)
      p.parse(cStringIO(xmlStr))
  
      return handler.interfaces
docs: Parses the supplied Introspection XML string and returns a list of
      L{interface.DBusInerface} instances representing the XML interface
      definitions.
  
      @type replaceKnownInterfaces: C{bool}
      @param replaceKnownInterfaces: If true, pre-existing interface definitions
                                     will be replaced by the contents of the
                                     interfaces defined within the XML string
  
      @rtype: C{list} of L{interface.DBusInerface}