If I could get the ContentHandler to support an interface like this:
public interface UnmarshalListener {
/**
* report new object detected
* @param object the new object occurrence
*/
public void objectStart(Object object);
/**
* report object finished
* @param object the finished object occurrence
*/
public void objectEnd(Object object);
}
Then I can manipulate the graph as I go by caching whatever I need and clearing collections as they are populated.. btw, is schema validation handled during xml parsing or is it done based on the resulting object graph?
- Henning Storhaug
________________________________
Fra: Henning Storhaug [mailto:Henning.Storhaug_at_fundator.no]
Sendt: ma 19.06.2006 15:43
Til: users_at_jaxb.dev.java.net
Emne: SV: Re: SAX-like JAXB?
Forgot to mention the schema is looking something like this: file ----> (1,999) batch -----> (1, * ) transaction.
________________________________
Fra: Henning Storhaug
Sendt: ma 19.06.2006 15:42
Til: users_at_jaxb.dev.java.net
Emne: SV: Re: SAX-like JAXB?
I managed to unmarshal transactions only based on the samples/partial-unmarshalling example.
So I'm half-way there, only the difficult part left now.
Is there a simple way to break up the unmarshalling so I can have the batch objects without adding all the transaction objects to it? I still want the transaction object, but I must handle them individually. Can I achieve this by manipulating the generated code? (using jwsdp-2.0)
- Henning Storhaug
________________________________
Fra: Victor Glushenkov [mailto:vglushenkov_at_pharmanet.ru]
Sendt: to 15.06.2006 10:36
Til: users_at_jaxb.dev.java.net
Emne: Re: SAX-like JAXB?
Henning Storhaug wrote:
> Hi,
>
> I must write a xml parser that reads records and process them individually due to memory constraints. I cannot read the whole file into memory.
Take a look on samples/partial-unmarshalling in JAXB-RI.
--
Pharmanet, Cubus Team
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net