This class manages the creation of Digester instances from XML digester
rules files.
createDigester
public static Digester createDigester(InputSource rulesSource)
Creates a new digester and initializes it from the specified InputSource
rulesSource
- load the xml rules from this InputSource
- a new Digester initialized with the rules
createDigester
public static Digester createDigester(InputSource rulesSource,
Digester rulesDigester)
Creates a new digester and initializes it from the specified InputSource.
This constructor allows the digester to be used to load the rules to be specified.
This allows properties to be configured on the Digester instance before it is used.
rulesSource
- load the xml rules from this InputSourcerulesDigester
- digester to load the specified XML file.
- a new Digester initialized with the rules
createDigester
public static Digester createDigester(URL rulesXml)
Creates a new digester and initializes it from the specified XML file
rulesXml
- URL to the XML file defining the digester rules
- a new Digester initialized with the rules
createDigester
public static Digester createDigester(URL rulesXml,
Digester rulesDigester)
Creates a new digester and initializes it from the specified XML file.
This constructor allows specifing a rulesDigester to do the XML file
loading; thus no matter the XML files is packed into a jar, a war, or a
ear, the rulesDigester can always find the XML files with properly set
ClassLoader.
rulesXml
- URL to the XML file defining the digester rulesrulesDigester
- digester to load the specified XML file.
- a new Digester initialized with the rules
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
InputStream input)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an input stream,
this method parses the input into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterinput
- InputStream over the XML file to parse into Java objects
- an Object which is the root of the network of Java objects
created by digesting fileURL
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
InputStream input,
Object rootObject)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an input stream,
this method parses the input into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterinput
- InputStream over the XML file to parse into Java objectsrootObject
- an Object to push onto the digester's stack, prior
to parsing the input
- an Object which is the root of the network of Java objects
created by digesting fileURL
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
Reader reader)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an input stream,
this method parses the input into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterreader
- Reader over the XML file to parse into Java objects
- an Object which is the root of the network of Java objects
created by digesting fileURL
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
Reader input,
Object rootObject)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an input stream,
this method parses the input into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterinput
- Reader over the XML file to parse into Java objectsrootObject
- an Object to push onto the digester's stack, prior
to parsing the input
- an Object which is the root of the network of Java objects
created by digesting fileURL
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
URL fileURL)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an XML input file,
this method parses the input file into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterfileURL
- URL to the XML file to parse into Java objects
- an Object which is the root of the network of Java objects
created by digesting fileURL
load
public static Object load(URL digesterRules,
ClassLoader classLoader,
URL fileURL,
Object rootObject)
throws IOException,
SAXException,
DigesterLoadingException
Given the digester rules XML file, a class loader, and an XML input file,
this method parses the input file into Java objects. The class loader
is used by the digester to create the Java objects.
digesterRules
- URL to the XML document defining the digester rulesclassLoader
- the ClassLoader to register with the digesterfileURL
- URL to the XML file to parse into Java objectsrootObject
- an Object to push onto the digester's stack, prior
to parsing the input
- an Object which is the root of the network of Java objects.
Usually, this will be the same object as rootObject
created by digesting fileURL