You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fc...@elektra.com.mx on 2006/02/22 19:55:41 UTC

org.apache.tomcat.util.digester.Digester

Hi the list,

I'm trying to use the class org.apache.tomcat.util.digester.Digester but I 
got a missunderstanding... I hope you could help me.
I read connectors/util/java/org/apache/tomcat/util/digester/package.html

What I got is this kind of xml file :

<mytag1>
        <mytagid>ID</mytagid>
        <mytagprop>PROP1</mytagprop>
        <mytagprop>PROP2</mytagprop>
</mytag1>

I got a function : public void analysemytag1(String tagprop, String 
tagid);

and what I want to do is call this function "analysemytag1" for each tag 
"mytagprop" with the same tagid, which is mytagid.
in this case I want digester to do this 2 calls :
analysemytag1("ID", "PROP1");
analysemytag1("ID", "PROP2");

So I did something like this :

digester.addCallMethod("mytag1/mytagprop", "analysemytag1", 2);
digester.addCallParam("mytag1/mytagid", 1);
digester.addCallParam("mytag1/mytagprop", 0);

But it doesn't work at all... So I'd like to know if I have to create a 
bean or if there is an another method to do what I want ?

Thanks for the help

Fabien



-----------------------------------------
La informaci�n transmitida mediante el presente correo es para la(s)
persona(s) cuya direcci�n aparece al calce, la informaci�n contenida es
estrictamente confidencial y para lectura exclusiva de la (s) persona
(s) mencionada(s) por lo que esta prohida la reproducci�n, distribuci�n
o copia del presente. Si usted ha recibido este correo por error, favor
de contactar con el remitente y eliminarlo de todas las charolas de su
correo. The information transmitted by this e-mail is intended only for
the person or entity to which it is addressed and may contain
confidential and/or privileged material. If the reader of this message
is not the intended recipient, you are hereby notified that you have
received this message by error and that any review, dissemination,
distribution or copying of this message including any attachments is
strictly prohibited. If you received this by error, please contact the
sender and delete the information from any computer.