Class TldParser
java.lang.Object
org.apache.tomcat.util.descriptor.tld.TldParser
Parses a Tag Library Descriptor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(TldResourcePath path) Parses a TLD from the given resource path.voidsetClassLoader(ClassLoader classLoader) Sets the class loader used for parsing.
-
Constructor Details
-
TldParser
public TldParser(boolean namespaceAware, boolean validation, boolean blockExternal) Creates a new TldParser with default rules.- Parameters:
namespaceAware- whether namespace processing is enabledvalidation- whether XML validation is enabledblockExternal- whether external entities should be blocked
-
TldParser
public TldParser(boolean namespaceAware, boolean validation, RuleSet ruleSet, boolean blockExternal) Creates a new TldParser with the specified rule set.- Parameters:
namespaceAware- whether namespace processing is enabledvalidation- whether XML validation is enabledruleSet- the rule set for parsingblockExternal- whether external entities should be blocked
-
-
Method Details
-
parse
Parses a TLD from the given resource path.- Parameters:
path- the TLD resource path- Returns:
- the parsed tag library XML
- Throws:
IOException- if an I/O error occursSAXException- if a parsing error occurs
-
setClassLoader
Sets the class loader used for parsing.- Parameters:
classLoader- the class loader
-