Class TldParser

java.lang.Object
org.apache.tomcat.util.descriptor.tld.TldParser

public class TldParser extends Object
Parses a Tag Library Descriptor.
  • Constructor Details

    • TldParser

      public TldParser(boolean namespaceAware, boolean validation, boolean blockExternal)
      Creates a new TldParser with default rules.
      Parameters:
      namespaceAware - whether namespace processing is enabled
      validation - whether XML validation is enabled
      blockExternal - 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 enabled
      validation - whether XML validation is enabled
      ruleSet - the rule set for parsing
      blockExternal - whether external entities should be blocked
  • Method Details

    • parse

      public TaglibXml parse(TldResourcePath path) throws IOException, SAXException
      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 occurs
      SAXException - if a parsing error occurs
    • setClassLoader

      public void setClassLoader(ClassLoader classLoader)
      Sets the class loader used for parsing.
      Parameters:
      classLoader - the class loader