commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Mitev" <>
Subject [Digester] Question about digester rules
Date Thu, 30 Nov 2006 13:42:46 GMT
Hi all. I got the following XML

            <text>Only digit values are allowed</text>

Here is my bean

public class RegexValidatorType {

    private String expression;

    private HashMap messages;

    private String type;

    //getters and settters here

I want to strore All regex-validators in ArrayList of RegexType bean and to
store the messages in HashMap with key <local> and value <text>. How to do
that inserting in the map with digester?

This is my code without the messages mapping:

digester.addObjectCreate("regex-validators", ArrayList.class);
digester.addSetNext("regex-validators/regex-validator", "add");

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message