GeoRSSを出力しようと思ったけど、Informa ではできないっぽい。

de.nava.informa.exporters.RSS_2_0_Exporter クラスを見ると


public void write(ChannelIF channel) throws IOException {
    if (writer == null) {
        throw new RuntimeException("No writer has been initialized.");
    }
 
    // create XML outputter with indent: 2 spaces, print new lines.
    Format format = Format.getPrettyFormat();
    format.setEncoding(encoding);
    XMLOutputter outputter = new XMLOutputter(format);
    
    Namespace dcNs = Namespace.getNamespace("dc", NS_DC);
    Namespace syNs = Namespace.getNamespace("sy", NS_SY);
    Namespace adminNs = Namespace.getNamespace("admin", NS_ADMIN);
    //Namespace rdfNs = Namespace.getNamespace("rdf", NS_RDF);
 
    Element rootElem = new Element("rss");
    rootElem.addNamespaceDeclaration(dcNs);
    rootElem.addNamespaceDeclaration(syNs);
    rootElem.addNamespaceDeclaration(adminNs);
    rootElem.setAttribute("version", RSS_VERSION);

うーん。きめうち。

それにしても、いつのまにか informa は最新バージョンの 0.7.0 (Alpha 2) しかダウンロードできなくなっている → Informa: RSS Library for Java

Ref.

tags: zurazure

Posted by NI-Lab. (@nilab)