On Thu, 2007-08-09 at 14:06 -0700, DM wrote:
> Hi, 
> 
> I'm using the Apache Digester to parse this XML:
> 
>       <subscriber ref="200sub-ref">
>         <nn>sub-nick3</nn>
>         <pn>2000000003</pn>
>       </subscriber>
> 
> 
> I've created a SetNestedPropertiesRule with the code:
> 
> Digester digester = new Digester();
> String[] elementNames = { "nn", "pn" };
> String[] propertyNames = { "nickname", "phoneNumber" };
> digester.addSetNestedProperties("subscriber", elementNames , propertyNames);
> 
> 
> However, it appears that the setNickname() and setPhoneNumber() methods of 
> the object are not being called. I've tried replacing the code above with my 
> own implementation of SetNestedPropertiesRule in order to better debug the 
> code. However, I can't find a way to see what methods are being called on the 
> target object (the object at the top of the stack) and what parameter values 
> are passed to these methods, any suggestions?

Enabling debug logging for category
"org.apache.commons.digester.Digester" should output all the info that
you are looking for.

If you are already using logging (java.util.logging, log4j, etc) then
just adjust your existing logging config file. If you have not got any
logging set up, then the easiest solution is probably to enable the
commons-logging "simplelog" via commandline options:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.defaultlog=debug

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to