package com.commafeed.backend.rome;

import org.jdom2.Document;
import org.jdom2.Element;

import com.rometools.opml.io.impl.OPML10Parser;

/**
 * Support for OPML 1.1 parsing
 * 
 */
public class OPML11Parser extends OPML10Parser {

	public OPML11Parser() {
		super("opml_1.1");
	}

	@Override
	public boolean isMyType(Document document) {
		Element e = document.getRootElement();

		if (e.getName().equals("opml")) {
			return true;
		}

		return false;

	};
}

@@ -28,24 +28,52 @@
 nd.rome;%0D%0A%0D%0A
+import java.util.Locale;%0D%0A%0D%0A
 import org.j
@@ -88,16 +88,16 @@
 ument;%0D%0A
-
 import o
@@ -165,16 +165,103 @@
 Parser;%0D
+%0Aimport com.rometools.rome.feed.WireFeed;%0D%0Aimport com.rometools.rome.io.FeedException;%0D
 %0A%0D%0A/**%0D%0A
@@ -596,12 +596,275 @@
 %0D%0A%0D%0A
-
 %09%7D;%0D
+%0A%0D%0A%09@Override%0D%0A%09public WireFeed parse(Document document, boolean validate, Locale locale) throws IllegalArgumentException, FeedException %7B%0D%0A%09%09document.getRootElement().getChildren().add(new Element(%22head%22));%0D%0A%09%09return super.parse(document, validate, locale);%0D%0A%09%7D%0D
 %0A%7D%0D%0A

fix opml import without head element (fix #737)