Hi Christian,
This is a pretty common question so I've added an entry to the Digester FAQ.
Please see the last section of this page:
http://wiki.apache.org/jakarta-commons/Digester/FAQ
NB: your email was in general very well phrased but in future please try to
provide a more useful subject line; almost every question ever asked about
Digester is a "Parsing Question" ;-)
Regards,
Simon
---- Christian Barth <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm completly new to Digester. I want to parse a XML-File to generate a
> HTML-Email.
>
> My XML has the following structure:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <email>
> <subject>some subject</subject>
> <from>[EMAIL PROTECTED]</from>
> <message>
> <html>
> <body>
> <h1>BLABLABLA</h1>
> <hr></hr>
> <h2>blabla</h2>
> <br></br>
> <h2>bla</h2>
> <h2>bla</h2>
> <br></br>
> <br></br>
> <br></br>
> <h2>Greetings,</h2>
> <h2>bla</h2>
> </body>
> </html>
> </message>
> </email>
>
> My Digester configuration looks as follows:
>
> Digester digester = new Digester();
> digester.setValidating(false);
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]