org.apache.commons.digester
public abstract class Rule extends Object
| Field Summary | |
|---|---|
| protected Digester | digester
The Digester with which this Rule is associated. |
| protected String | namespaceURI
The namespace URI for which this Rule is relevant, if any. |
| Constructor Summary | |
|---|---|
| Rule(Digester digester)
Constructor sets the associated Digester.
| |
| Rule() Base constructor. | |
| Method Summary | |
|---|---|
| void | begin(Attributes attributes)
This method is called when the beginning of a matching XML element
is encountered.
|
| void | begin(String namespace, String name, Attributes attributes)
This method is called when the beginning of a matching XML element
is encountered. |
| void | body(String text)
This method is called when the body of a matching XML element
is encountered. |
| void | body(String namespace, String name, String text)
This method is called when the body of a matching XML element is
encountered. |
| void | end()
This method is called when the end of a matching XML element
is encountered.
|
| void | end(String namespace, String name)
This method is called when the end of a matching XML element
is encountered. |
| void | finish()
This method is called after all parsing methods have been
called, to allow Rules to remove temporary data. |
| Digester | getDigester()
Return the Digester with which this Rule is associated. |
| String | getNamespaceURI()
Return the namespace URI for which this Rule is relevant, if any. |
| void | setDigester(Digester digester)
Set the Digester with which this Rule is associated. |
| void | setNamespaceURI(String namespaceURI)
Set the namespace URI for which this Rule is relevant, if any.
|
Deprecated: The digester instance is now set in the Digester method. Use Rule instead.
Constructor sets the associated Digester.Parameters: digester The digester with which this rule is associated
Base constructor. Now the digester will be set when the rule is added.
Deprecated: Use the begin
method with namespace and name
parameters instead.
Parameters: attributes The attribute list of this element
begin without the
namespace and name parameters, to retain
backwards compatibility.
Parameters: namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace name the local name if the parser is namespace aware, or just the element name otherwise attributes The attribute list of this element
Since: Digester 1.4
Deprecated: Use the body method
with namespace and name parameters
instead.
Parameters: text The text of the body of this element
The default implementation delegates to the deprecated method
body without the namespace and
name parameters, to retain backwards compatibility.
Parameters: namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace name the local name if the parser is namespace aware, or just the element name otherwise text The text of the body of this element
Since: Digester 1.4
Deprecated: Use the end method with
namespace and name parameters instead.
end without the
namespace and name parameters, to retain
backwards compatibility.
Parameters: namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace name the local name if the parser is namespace aware, or just the element name otherwise
Since: Digester 1.4
Digester with which this Rule is associated.Parameters: namespaceURI Namespace URI for which this Rule is relevant,
or null to match independent of namespace.