code: public static PluginDefinition parseXmlPluginDefinition(final ClassLoader cl, final InputStream in) throws PluginConfigurationException {
  
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  
          Document document;
  
          try {
              DocumentBuilder loader = factory.newDocumentBuilder();
              DOMReader reader = new DOMReader();
  
              document = reader.read(loader.parse(in));
          } catch (Exception e) {
              throw new PluginConfigurationException(e.getMessage(), e);
          }
  
          Element plugin = document.getRootElement();
  
          // TODO : validate against schema
  
          return parsePluginDefinition(cl, plugin);
      }
docs: Loads the definition of a single plugin from an XML file.
  
  @param cl
  The classloader to be used to instantiate the plugin class
  @param in
  The stream to the XML file
  @return The plugin definition
  @throws PluginConfigurationException if an error occurs parsing the plugin definition