commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Miller" ...@howardmiller.co.uk>
Subject Re: Digester - Aaargh
Date Sun, 05 Jan 2003 11:41:57 GMT
Answered my own question (again). Read that bit about pushing an 
object onto the stack and thought that was how it *had* to be done. 
Have now noticed the return type of parse(). 

Progress, now parses but doesn't pick up the name.. oh well!!

HM

On 5 Jan 2003 at 11:35, Howard Miller wrote:

> Hi,
> 
> I can't get th digester to work....
> 
> Basically, I can't get results back off the stack. I am creating a bean which has one

> property - the root of my parse tree. I am pushing that onto the stack (digester.push(

> hackBean )), I then call digester.parse( file ). I dont' get any errors from the parse,
but 
> when I try to pop "hackBean" off the stack, the stack is empty!!
> 
> Are there any "gotchas" that I might be missing. I can't find any examples of doing 
> this!! My xml file and rules are trivial, so I have posted them here as well....
> 
> Any help appreciated
> 
> <?xml version="1.0" ?>
> 
> <survey>
> 
>   <survey-name>
>     Test Survey
>   </survey-name>  
> </survey>
> 
> 
> <?xml version="1.0"?>
> 
> <digester-rules>
> 
>   <pattern value="survey">
>     <object-create-rule classname="org.alicats.quest.Survey" />
>     <call-method-rule pattern="name" methodname="setName" />
>     <set-next-rule methodname="setSurvey" />
>   </pattern>
> 	
> </digester-rules>
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-user-help@jakarta.apache.org>
> 
> 



Mime
View raw message