Hi Yoav,
Your xml format has to be that one?
With this other format the solution will be straightforward

<a>
 <b class="package.class">
   <foo>bar</foo>
 </b>
</a>

digester.addSetProperties("a/b");



Shapira, Yoav wrote:

Hi,
I have the following XML:
<a>
 <b class="package.class">
   <c>
     <d>foo</d>
     <e>bar</e>
   </c>
 </b>
</a>

The class specified as the attribute of element b has a writeable
property named foo, i.e a public void setFoo(String) method, as well as
a public no-args constructor.  I want digester to

1. When encountering b elements create a new instance of the class
specified.
2. Set the attribute named in d to the value named in e.

I think the first part I can do with

digester.addObjectCreate("a/b", null, "class");

But how can I do the second part?

Thanks,

Yoav Shapira
Millennium ChemInformatics





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





-------------------------------------------------------------------------------------------------------------------
Este correo electr�nico y, en su caso, cualquier fichero anexo al mismo, contiene 
informaci�n de car�cter confidencial exclusivamente dirigida a su destinatario o 
destinatarios. Queda prohibida su divulgaci�n, copia o distribuci�n a terceros sin la 
previa autorizaci�n escrita de Indra. En el caso de haber recibido este correo 
electr�nico por error, se ruega notificar inmediatamente esta circunstancia mediante 
reenv�o a la direcci�n electr�nica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to