tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fcarr...@elektra.com.mx
Subject org.apache.tomcat.util.digester.Digester
Date Wed, 22 Feb 2006 18:55:41 GMT
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.

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