Class TldParser
- java.lang.Object
-
- org.apache.tomcat.util.descriptor.tld.TldParser
-
public class TldParser extends java.lang.ObjectParses a Tag Library Descriptor.
-
-
Constructor Summary
Constructors Constructor Description TldParser(boolean namespaceAware, boolean validation, boolean blockExternal)Creates a new TldParser with default rules.TldParser(boolean namespaceAware, boolean validation, RuleSet ruleSet, boolean blockExternal)Creates a new TldParser with the specified rule set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaglibXmlparse(TldResourcePath path)Parses a TLD from the given resource path.voidsetClassLoader(java.lang.ClassLoader classLoader)Sets the class loader used for parsing.
-
-
-
Constructor Detail
-
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 Detail
-
parse
public TaglibXml parse(TldResourcePath path) throws java.io.IOException, org.xml.sax.SAXException
Parses a TLD from the given resource path.- Parameters:
path- the TLD resource path- Returns:
- the parsed tag library XML
- Throws:
java.io.IOException- if an I/O error occursorg.xml.sax.SAXException- if a parsing error occurs
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
Sets the class loader used for parsing.- Parameters:
classLoader- the class loader
-
-