Class EmptyElementHandler.SetEmptyElementHandler

    • Field Detail

      • mEmptyElements

        protected final Set<String> mEmptyElements
    • Constructor Detail

      • SetEmptyElementHandler

        public SetEmptyElementHandler​(Set<String> emptyElements)
    • Method Detail

      • allowEmptyElement

        public boolean allowEmptyElement​(String prefix,
                                         String localName,
                                         String nsURI,
                                         boolean allowEmpty)
        Specified by:
        allowEmptyElement in interface EmptyElementHandler
        Parameters:
        prefix - The element's namespace prefix, null if not set
        localName - The element's local name
        nsURI - The elements's namespace URI, null if not set
        allowEmpty - The allow empty setting specified by the caller.
        Returns:
        True if the empty element can be self-closing. False if a separate end tag should be written.