commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sills" <>
Subject RE: [Digester] Parsing question
Date Wed, 15 Nov 2006 17:35:11 GMT
Been a while since I've used Digester directly (I tend towards using
Betwixt), but I don't see how message is really any different from
subject or from. My first try would be to remove the "/*" from the rule:

digester.addBeanPropertySetter("email/message", "message");

If that doesn't work, try enclosing the HTML in a CDATA section - it
might work better then.

If neither of these work, then my sincerest apologies for any waste of
your time.

David Sills

-----Original Message-----
From: Christian Barth [] 
Sent: Wednesday, November 15, 2006 11:24 AM
Subject: [Digester] Parsing question


I'm completly new to Digester. I want to parse a XML-File to generate a

My XML has the following structure:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
	<subject>some subject</subject>

My Digester configuration looks as follows:

Digester digester = new Digester(); 
digester.addObjectCreate("email", EmailTemplate.class); 
digester.addBeanPropertySetter("email/subject", "subject"); 
digester.addBeanPropertySetter("email/message/*", "message");
digester.addBeanPropertySetter("email/from", "from"); 

"subject" and "from" are correctly extracted. But the message part only
return an empty string. Is there a possibility to extract the complete
html-part (surrounded by the "message"-tag) and put it into a String?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message