commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Schaare <fscha...@htp-tel.de>
Subject [Digester]How to access created objects
Date Tue, 04 Nov 2003 16:58:43 GMT
Hi,

i try to get familiar with the digester. Therefore i read all three (not 
very much) articles mentioned on digesterĀ“s homesite and tried some code 
like this:

 public void initSQLRules()
 {
  try
  {
  Digester digester = new Digester();
  digester.push(this);
  
  digester.addObjectCreate("Abfragen",Abfragen.class);
  
  digester.addObjectCreate("Abfragen/Abfrage",Abfrage.class);
  digester.addBeanPropertySetter("Abfragen/Abfrage/Name","name");
  digester.addBeanPropertySetter("Abfragen/Abfrage/SQL","wert");
  digester.addSetNext("Abfragen/Abfrage","addAbfrage");
  
  digester.parse("my.xml");  
 
  }
  catch (Exception e)
  {
  e.printStackTrace();
  }
  
 }

This seems to work, what exactly happen here ? Obviously, the digester 
gets some rules an delegates xml parsing to a SAXParser.

How do i access (get) the generatet Bean ?
Where is the bean object createt ?

Who has information about this mysterios stack ? The Code 
'digester.push(this);' seems to put the servlet instance on a stack. 
What for ?

Are there any sites that gain a little more information as jakarta does ?

thx for your answers.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message