code: def generateIntrospectionXML(objectPath, exportedObjects):
      
      l = [_dtd_decl]
      l.append('<node name="%s">' % (objectPath,))
  
      obj = exportedObjects.get(objectPath, None)
      if obj is not None:
          for i in obj.getInterfaces():
              l.append(i.introspectionXml)
          l.append(_intro)
  
      # make sure objectPath ends with '/' to only get partial matches based on
      # the full path, not a part of a subpath
      if not objectPath.endswith('/'):
          objectPath += '/'
      matches = []
      for path in exportedObjects.keys():
          if path.startswith(objectPath):
              path = path[len(objectPath):].partition('/')[0]
              if path not in matches:
                  matches.append(path)
  
      if obj is None and not matches:
          return None
  
      for m in matches:
          l.append('<node name="%s"/>' % m)
  
      l.append('</node>')
      return '\n'.join(l)
docs: Generates the introspection XML for an object path or partial object path
      that matches exported objects.
  
      This allows for browsing the exported objects with tools such as d-feet.
  
      @rtype: C{string}