/*
  * @see org.rssowl.core.interpreter.IFormatInterpreter#interpret(org.jdom.Document,
  * org.rssowl.core.interpreter.types.IFeed)
  */
 public void interpret(Document document, IFeed feed) {
   Element root = document.getRootElement();
   setDefaultNamespaceUri(root.getNamespace().getURI());
   setRootElementName(root.getName());
   feed.setFormat("RSS"); // $NON-NLS-1$
   processFeed(root, feed);
 }
  private void processFeed(Element element, IFeed feed) {

    /* Interpret Attributes */
    List<?> attributes = element.getAttributes();
    for (Iterator<?> iter = attributes.iterator(); iter.hasNext(); ) {
      Attribute attribute = (Attribute) iter.next();
      String name = attribute.getName();

      /* Check wether this Attribute is to be processed by a Contribution */
      if (processAttributeExtern(attribute, feed)) continue;

      /* Version */
      else if ("version".equals(name)) // $NON-NLS-1$
      feed.setFormat(buildFormat("RSS", attribute.getValue())); // $NON-NLS-1$
    }

    /* Interpret Children */
    List<?> feedChildren = element.getChildren();
    for (Iterator<?> iter = feedChildren.iterator(); iter.hasNext(); ) {
      Element child = (Element) iter.next();
      String name = child.getName().toLowerCase();

      /* Check wether this Element is to be processed by a Contribution */
      if (processElementExtern(child, feed)) continue;

      /* Process Channel */
      else if ("channel".equals(name)) // $NON-NLS-1$
      processChannel(child, feed);
    }
  }