On Thu, 2005-07-14 at 13:00 -0400, [EMAIL PROTECTED] wrote:
> Here is my example xml:
>
> <example-xml>
> <tests>
> <test key="abc" value="a" />
> <test key="xyz" value="b />
> </example-xml>
>
> Java code snippet:
>
> digester.addObjectCreate("example-xml/tests/", "Test.class");
> digester.addCallMethod("example-xml/tests/test", "addTest", 2);
> digester.addCallParam("example-xml/tests/test", 0, "key");
> digester.addCallParam("example-xml/tests/test", 1, "value");
>
> Test.addTest signature:
> addTest(String key, String value)
>
> This metod is never get called??? What I'm missing???
>
> I guess I don't know how to handle attributes. I can change <test> related
> attributes to sub-elements
> and that will work but was hoping to figure out the solution with attributes?
It all looks fine to me. I don't see where the problem might be.
You might like to look at the examples which can be found in the source
download for digester, in src/examples.
The other thing to try is to enable logging output for digester (a very
useful tool for these sorts of problems). See the FAQ on the wiki:
http://wiki.apache.org/jakarta-commons/Digester/FAQ
Just for the future, it would help if your email subject was a little
more explicit, eg:
[digester] problems passing attributes as parameters
This will allow people having similar problems in future to find this
thread in the email archives.
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]