On Sat, 18 Jan 2003, Howard Miller wrote:

> Date: Sat, 18 Jan 2003 16:24:15 -0000
> From: Howard Miller <[EMAIL PROTECTED]>
> Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Digester usage question
>
> Hi,
>
> If I have XML that looks like
>
> <root>
>   <thing page="10">
>     Some character data
>     Here
>   </thing>
> </root>
>
> ok, if I use an Object create rule to create the "thing" object. I can
> then use a SetProperties rule to call a setter on the object to deal
> with "page=".  However what I can't see is how the get at the
> character data between the <thing></thing> tags.
>

There is a special shortcut rule that handles this.  Assume your body text
should be copied to a property named "body":

  digester.addCallMethod("root/thing", "setBody", 0);

> Can someone help, please?
>

Craig


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

Reply via email to