commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C F <tacnab...@yahoo.com>
Subject Help with digester
Date Tue, 27 May 2003 20:31:16 GMT
Hello,
Could somebody please give me an example of how I might try to accomlish the following with
Digester (I'm coding, not using the XML config)?
 
Suppose, in my XML file, the following two nodes are valid....
 
example 1
--------------------
<department name="foo">
  <employee>
    Buddy Hackett
  </employee>
</department>
 
example 2
--------------------
<department name="foo">
  Buddy Hackett
</department>
 
In both cases I want an "Employee" object to be created with a property set to the node text,
setName("Buddy Hackett"), and then the "Employee" object assigned as a property to the parent
"Department" object.  
I would appreciated it if someone could whip up some sample code, as I'm at a loss and Digester
examples are few and far between (example 2 is where I'm having the trouble).
 
Thanks!!


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message