Class TldParser


  • public class TldParser
    extends java.lang.Object
    Parses 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
      TaglibXml parse​(TldResourcePath path)
      Parses a TLD from the given resource path.
      void setClassLoader​(java.lang.ClassLoader classLoader)
      Sets the class loader used for parsing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 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 occurs
        org.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