Sorry, I made a mistake... I actually get 8 pages of logs! They
actually look good. My document parses with no errors, but the
returned object has no data (all the fields are null). I am cringing
because I know I have done something really stupid - however if you
don't mind...
<?xml version="1.0"?>
<mailer>
<survey-number>11</survey-number>
<database-name>HMTest</database-name>
<host>mysql.marketingms.com</host>
<user>mms</user>
<password></password>
<state-start>NC</state-start>
<state-end>NC</state-end>
<email-field>HMTestSource.Email</email-field>
</mailer>
Digester digester = new
Digester();
digester.setValidating( false );
digester.addObjectCreate(
"mailer",Config.class );
digester.addBeanPropertySetter(
"mailer/survey-number", "SurveyNumber");
digester.addBeanPropertySetter(
"mailer/database-name", "DatabaseName");
digester.addBeanPropertySetter(
"mailer/host", "Host");
digester.addBeanPropertySetter(
"mailer/user", "User");
digester.addBeanPropertySetter(
"mailer/password", "Password");
digester.addBeanPropertySetter(
"mailer/state-start", "StateStart");
digester.addBeanPropertySetter(
"mailer/state-end", "StateEnd");
digester.addBeanPropertySetter(
"mailer/email-field", "EmailField");
File input = new File( filename
);
config = (Config)
digester.parse( input );
On 17 Jan 2003 at 13:49, Baltz, Kenneth wrote:
> Can you supply your XML and your digester code?
>
> K.C.
>
> > -----Original Message-----
> > From: Howard Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 17, 2003 1:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Logging again
> >
> >
> > Ha! good news and bad....
> >
> > I got a trace going with the addition of..
> >
> > -Dorg.apache.commons.logging.simplelog.defaultlog=trace
> >
> > This gives me the output...
> >
> > [DEBUG] Digester - - Fire body() for
> > ObjectCreateRule[className=org.alicats.mailer.Config,
> > attributeName=null]
> > [DEBUG] Digester - - Popping body text ''
> > [DEBUG] Digester - - Fire end() for
> > ObjectCreateRule[className=org.alicats.mailer.Config,
> > attributeName=null]
> > [DEBUG] Digester - -[ObjectCreateRule]{mailer} Pop
> > org.alicats.mailer.Config
> > [DEBUG] sax - -endDocument()
> >
> > This seems to be firing the rules for the opening and closing
> > root tags (<mailer>) and skipping everything else. Why might
> > this happen? Why does it say (atributeName=null)? I have a
> > load of addBeanPropertySetters in there to catch the
> > intermediate elements and they seem to be completely ignored.
> >
> > Stumped!
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>