Package org.htmlcleaner
Class ConfigFileTagProvider
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.htmlcleaner.ConfigFileTagProvider
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
,ITagInfoProvider
Configuration file tag provider - reads XML file in specified format and creates a Tag Provider.
Used to create custom tag providers when used on the command line.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
SAX parser for tag configuration files.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ConfigFileTagProvider
(File file) ConfigFileTagProvider
(URL url) ConfigFileTagProvider
(InputSource inputSource) -
Method Summary
Modifier and TypeMethodDescriptiongetTagInfo
(String tagName) static void
Generates code for tag provider class from specified configuration XML file.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
parserFactory
-
generateCode
private boolean generateCode
-
-
Constructor Details
-
ConfigFileTagProvider
private ConfigFileTagProvider() -
ConfigFileTagProvider
-
ConfigFileTagProvider
-
ConfigFileTagProvider
-
-
Method Details
-
getTagInfo
- Specified by:
getTagInfo
in interfaceITagInfoProvider
-
main
public static void main(String[] args) throws IOException, SAXException, ParserConfigurationException Generates code for tag provider class from specified configuration XML file. In order to create custom tag info provider, make config file and call this main method with the specified file. Output will be generated on the standard output. This way a custom tag provider (class CustomTagProvider) is generated from an XML file. An example XML file, "example.xml", can be found in the source distribution.- Parameters:
args
-- Throws:
IOException
SAXException
ParserConfigurationException
-