Dear Ralf,
 
Thanks for your reply, even you can't help me with my problem.
 
Anyway I am really suprise that I have no reply for this problem, that I guess should happend to someone before than me.
 
I am not agry about your comment on Open Source project, there are a lot of open source project and some of them works fine, they have a big comunity and people help each other, such as: Hibernate, Spring, Freemarker, Wikipedia, etc. It is not a question of money, it is a question of marketing and business philosofy and having a good idea,  and to really push into the open source market in order to get a higth popularity (Open Source doesn't mean to not earn money, good open source projects, such as Ant sells a lot of copy of good books for example).
 
I give you an example, Ofbiz is an open source project since 1997 I guess, but only a few people know about this product. It is good, but with a bat marketing policy (no consistent documentation, there is no book, etc) Nevertheless you can get for example Spring with a bigger popularity and it was founded on 2003!!!. The same situation apply for SAX etc. Ofbiz is a good product, but because its dificult learning curve it has considerable less populary comparing to other J2EE frameworks such as Spring, for example.
 
Castor is a really good product mainly for binding XML and Java Objects (because other competitors are not so complet, the JDO fetures have a good competitor as Hibernate, :-(, and good implementation of JDO standard are comercial), but there is no so much support, there is no forum and on the mailing list there is no so much movement. You find on the web a lot of articles and recomendation about Castor, but the reality is that it there are documented just simple situation on Castor Web page and on some articles, like parsing a file into the java object equivalent, and no more.
 
About my problem, I was looking into the source code, but I am not SAX expert, so I don't find a way to really get wat I want. There is no so well documented the purpose of EventProduct and also how to use it when invoking unmarshal(EventProducer eventProducer) another solution I guess could be to addapting via set method the getContentHandler(UnmarshalHandler handler) the handler, but I am even not sure about what I want it is really possible doing with Castor.
 
I am waiting for other list members in order to get some help abut that, I have tried to contact with Keith Visco but the e-mail on the source code is wrong.
 
If I no get any replay about this problem, I am thinking to split my original file into smaller file using split unix command (my original file is a flat file with records, I convert it into XML in order to unmarshal), I have no other solution for the moment, nevertheless I would prefer to find a solution using just java without any trick using unix command.
 
Thanks anyway for your help,
 
David


Ralf Joachim <[EMAIL PROTECTED]> wrote:
Hi David,

I saw your earlier mail on this topic but did not respond as I am not
able to help you with your problem as I am mainly focused on the JDO
side of castor and my knowledge on the XML side is quite limited. Please
be aware that castor is an open source project and that people working
at it do not always have the time they wanted to or is needed to respond
to every request.

Having said that I share your opinon that what you want to do should be
posible. But I am in the same position that you are as I also don't know
how. I can only suggest you to wait for a response of one with more
knowledge on XML things or to take a look at the castor source yourself
to find out how it works.

If you at least managed to get things working it would be great if you
could write a short howto that I could add to docs to help others being
in the same situation.


Sorry for any inconvenience
Ralf
Castor JDO, committer


David schrieb:
> Dear Members,
>
> I have a typical file like this:
>
>
>
>
> ...
>
>

>
> if the file is big enough I can't load the whole book store at once, my
> idea is to take one by one each information (or a fixed numbers
> of book elements for avoiding overflow), then for example store into
> database and then to take the next one, so I want to parse book event,
> process it and then to go to the next one. ¿How can we do it with castor?
>
> If I bind the hole bookstore element into BookStore class with million
> of books I get Overflow for sure.
>
> It should be a solution where the unmarshall process get each time a
> book then you process it (for example stores into database) and go to
> the next book without creation a new object for example each time or
> doing by a package of certain number of books each time.
>
> Thanks in advance,
>
> David Leal
> [EMAIL PROTECTED]
>
> ------------------------------------------------------------------------
> Relax. Yahoo! Mail virus scanning
>
> helps detect nasty viruses!

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




What are the most popular cars? Find out at Yahoo! Autos

Reply via email to