示例 XML。
<person>
<name>Joe Dirt</name>
<ssn>123-45-6789</ssn>
<dob>07/04/1981</dob>
</person>
示例 Java 类
public class Person(){
private String name;
private String ssn;
private java.util.Date dob;
.....
}
示例 Digester 规则
<?xml version="1.0"?>
<digester-rules>
<pattern value="message">
<object-create-rule classname="Person" />
<bean-property-setter-rule pattern="name" propertyname="name" />
<bean-property-setter-rule pattern="ssn" propertyname="ssn" />
<bean-property-setter-rule pattern="dob" propertyname="dob" />
</pattern>
</digester-rules>