forked from Archives/Athou_commafeed
fix opml import without head element (fix #737)
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
package com.commafeed.backend.rome;
|
package com.commafeed.backend.rome;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.jdom2.Document;
|
import org.jdom2.Document;
|
||||||
import org.jdom2.Element;
|
import org.jdom2.Element;
|
||||||
|
|
||||||
import com.rometools.opml.io.impl.OPML10Parser;
|
import com.rometools.opml.io.impl.OPML10Parser;
|
||||||
|
import com.rometools.rome.feed.WireFeed;
|
||||||
|
import com.rometools.rome.io.FeedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Support for OPML 1.1 parsing
|
* Support for OPML 1.1 parsing
|
||||||
@@ -26,4 +30,10 @@ public class OPML11Parser extends OPML10Parser {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WireFeed parse(Document document, boolean validate, Locale locale) throws IllegalArgumentException, FeedException {
|
||||||
|
document.getRootElement().getChildren().add(new Element("head"));
|
||||||
|
return super.parse(document, validate, locale);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user