Let me rephrase the question.  I know that it is possible to create a
BeanReader and when it is constructed explicitly add digester rules to
handle the mapping like the following:

addCallMethod(
        "*/contextproperty",
        "setContextproperty",
        2,
        new String[]{"java.lang.String", "java.lang.String"}
 );
 addCallParam("*/contextproperty",0,"key");
 addCallParam("*/contextproperty",1,"value");

This will work in my case but is this necessary?  Am I missing something
with the base BeanReader where it can do maps without the addition of
digester rules?

John


At 11:05 AM 11/13/02 -0600, you wrote:
>Is it possible to use a BeanReader to parse xml into a mapped property.
>For example, I wish to parse the following xml:
>
><contextproperties>
>                  <contextproperty
>                    key= "java.naming.factory.initial"
>                    value = "com.sun.jndi.ldap.LdapCtxFactory"/>
>                  <contextproperty
>                    key= "java.naming.provider.url"
>                    value = "ldap://mudsharks:389/o=Verticon,c=US"/>
></contextproperties>
>
>into a bean that has the following methods:
> 
> public Properties getContextproperties(){
>    return properties;
>  }
>
>  public void setContextproperty(String key, String value){
>    properties.setProperty(key,value);
>  }
>
>  public String getContextproperty(String key){
>    return properties.getProperty(key);
>  }
>
>thanks,
>John
>
>--
>To unsubscribe, e-mail:
<mailto:commons-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
<mailto:commons-user-help@;jakarta.apache.org>
> 
********************
John E. Conlon
<mailto:jconlon@;verticon.com>mailto:jconlon@;verticon.com
<http://www.verticon.com/>www.verticon.com
tel: (608) 675-3865
cell: (608) 606-1292
********************
"None are more hopelessly enslaved than those who falsely believe
they are free." - Goethe


--
To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>

Reply via email to