Class BaseWireFeedGenerator

    • Constructor Detail

      • BaseWireFeedGenerator

        protected BaseWireFeedGenerator​(String type)
    • Method Detail

      • generateModuleNamespaceDefs

        protected void generateModuleNamespaceDefs​(org.jdom2.Element root)
      • generateFeedModules

        protected void generateFeedModules​(List<Module> modules,
                                           org.jdom2.Element feed)
      • generateItemModules

        public void generateItemModules​(List<Module> modules,
                                        org.jdom2.Element item)
      • generatePersonModules

        public void generatePersonModules​(List<Module> modules,
                                          org.jdom2.Element person)
      • generateForeignMarkup

        protected void generateForeignMarkup​(org.jdom2.Element element,
                                             List<org.jdom2.Element> foreignElements)
      • purgeUnusedNamespaceDeclarations

        protected static void purgeUnusedNamespaceDeclarations​(org.jdom2.Element root)
        Purging unused declarations is less optimal, performance-wise, than never adding them in the first place. So, we should still ask the ROME guys to fix their code (not adding dozens of unnecessary module declarations). Having said that: purging them here, before XML generation, is more efficient than parsing and re-molding the XML after ROME generates it.

        Note that the calling app could still add declarations/modules to the Feed tree after this. Which is fine. But those modules are then responsible for crawling to the root of the tree, at generate() time, to make sure their namespace declarations are present.