commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitri Frederickx" <>
Subject [Digester] How to map html-td elements to methods?
Date Fri, 30 Dec 2005 13:41:11 GMT
Hi, I've used commons digester in a few applications, but now I want to do a
mapping that is a little bit tricky.


This is an extract of my xml (xhtlm) file:



                    <td class="command">open</td>

                    <td class="target">./tests/html/test_open.html</td>

                    <td class="value">&nbsp;</td>



                    <td class="command">verifyLocation</td>

                    <td class="target">/tests/html/test_open.html</td>

                    <td class="value">&nbsp;</td>




This is a part of my java source file:

public class Test {


            private String command;

            private String target;

            private String value;


            public void setCommand(String functionName) {

                        this.command = functionName;



            public void setTarget(String target) {

               = target;



            public void setValue(String value) {

                        this.value = value;





I want that the value of the class-attribute maps to the property (and
method name), and the value of the tag must be the value to pass to this

Is there a way to do this with digester? Does anyone has done something like
this? It would help me a lot, because I'm really stuck at this moment.




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