code: @Override
      public void addRuleInstances (Digester digester)
      {
          // this creates the appropriate instance when we encounter a
          // <action> tag
          digester.addObjectCreate(_prefix + ACTION_PATH,
                                   ActionSequence.class.getName());
  
          // grab the name attribute from the <action> tag
          digester.addRule(_prefix + ACTION_PATH, new SetPropertyFieldsRule());
  
          // grab the other attributes from their respective tags
          digester.addRule(_prefix + ACTION_PATH + "/framesPerSecond",
                           new SetFieldRule("framesPerSecond"));
  
          CallMethodSpecialRule origin = new CallMethodSpecialRule() {
              @Override
              public void parseAndSet (String bodyText, Object target)
                  throws Exception {
                  int[] coords = StringUtil.parseIntArray(bodyText);
                  if (coords.length != 2) {
                      String errmsg = "Invalid <origin> specification '" +
                          bodyText + "'.";
                      throw new Exception(errmsg);
                  }
                  ((ActionSequence)target).origin.setLocation(
                      coords[0], coords[1]);
              }
          };
          digester.addRule(_prefix + ACTION_PATH + "/origin", origin);
  
          CallMethodSpecialRule orient = new CallMethodSpecialRule() {
              @Override
              public void parseAndSet (String bodyText, Object target)
                  throws Exception {
                  ActionSequence seq = ((ActionSequence)target);
                  String[] ostrs = StringUtil.parseStringArray(bodyText);
                  seq.orients = new int[ostrs.length];
                  for (int ii = 0; ii < ostrs.length; ii++) {
                      int orient = DirectionUtil.fromShortString(ostrs[ii]);
                      if (orient != DirectionCodes.NONE) {
                          seq.orients[ii] = orient;
                      } else {
                          String errmsg = "Invalid orientation specification " +
                              "[index=" + ii + ", orient=" + ostrs[ii] + "].";
                          throw new Exception(errmsg);
                      }
                  }
              }
          };
          digester.addRule(_prefix + ACTION_PATH + "/orients", orient);
      }
docs: Adds the necessary rules to the digester to parse our actions.