Xml to Java Binding with filters

classic Classic list List threaded Threaded
1 message Options
kkv
Reply | Threaded
Open this post in threaded view
|

Xml to Java Binding with filters

kkv
This post has NOT been accepted by the mailing list yet.
I am having a requirement which I think smooks will be of help. Wanted to know how to use it for the use case.

We have a huge xml of 2GB and over, which is well structured having an array of say orders.

Want to convert this into Java and the smooks java binding will help. But the optimization that can be done is, I have some filter conditions on the order and if it does not satisfy, i can ignore that order.

The filter condition will be based on checking multiple order attributes/conditions.

Finally I need only Java objects that satisfy the inclusion filter. Also we know that only 10% of the orders will be needed and 90% of the orders ignored.

So need the best of both worlds, where i should specify Java binding via smooks xml, But need not iterate 2GB worth of java objects and filter them out.

If i have some hook (either pre or post java conversion on each order), i can say, need not create the object instance or delete the object instance, I can reduce the overall memory foot print.

Please let me if i acheive this in smooks.