commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lena...@email.arizona.edu
Subject Re: Betwixt: BeanReader setup question
Date Wed, 09 Apr 2008 17:38:07 GMT
Nathalie,

I've been very frustrated with the fact that I can't get adequate 
feedback from
Betwixt.  I haven't looked into if there are logging settings that can be
tweaked to get more feedback, if anyone else knows - that would be a nice bit
of information. I come from a .NET background, so I'm not overly familiar with
things that most developers that use Commons take for granted.

I realized now that it would be helpful to have an idea about your 
pojo/bean(s).

Let's work up a better example than what we have here:

Your Example 1
>
> <me>
>     <a/>
>     <b/>
>     <c/>
> </me>

...because I don't see the values that would be store in the bean really. An
instance of 'me' with a class called 'a' and one called 'b' and another 
'c'.  I
mean, it's not very to me what is being modeled nor is what is just structure
and what is data.  I appreciate a simple, concise example when asking 
questions
- but this is so terse that the meaning and intent is not clear to me.

It would be nice to flush something out like:

<me id="he3432h11-032">
    <a name="rock hard" />
    <b name="monkey" />
    <c name="scam tactics" />
</me>

Now we've got some data.  We can play with this a bit more now. You 
mention that
your beans don't have anything in them - but in that first, concise example
(Your Example 1) there really isn't any data to be stored in a bean.

For this - below - I would expect an exception to be thrown by the underlying
XML parser.  Remember, a valid, well-formed XML document must have only one
root.  This violates that rule.

> <me>
>     <a/>
>     <b/>
>     <c/>
> </me>
> <me>
>     <a/>
>     <b/>
>     <c/>
> </me>

So let me know if my take on your example is okay - or point out a better
example.  And then would you provide the pojo/bean(s) involved along 
with their
mapping.

Andy

/****************************************
  * @author:  Andrew Lenards
  * @email:   lenards@email.arizona.edu
  * @title:   Systems Programmer, Principal
  * @project: Tree of Life Web Project
  * @website: http://tolweb.org/
  * @dept:    Dept. of Entomology
  * @school:  University of Arizona
  * @geo-loc: Tucson, AZ 85721
  ***************************************/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message