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:
<tbody>
<tr>
<td class="command">open</td>
<td class="target">./tests/html/test_open.html</td>
<td class="value"> </td>
</tr>
<tr>
<td class="command">verifyLocation</td>
<td class="target">/tests/html/test_open.html</td>
<td class="value"> </td>
</tr>
</tbody>
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) {
this.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
method.
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.
Regards,
Dimitri