I want to use JiBX to unmarshall huge XML files, but I don't want it to
validate against the XSD. How do I do this?

Proof of concept (jUnit snippet that works for XMLs compliant against the
XSD):

IBindingFactory bfact = BindingDirectory.getFactory(Customer.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Customer customer = (Customer) uctx.unmarshalDocument(new
FileInputStream(fileLocation), null);

Why do I need this? I have a RESTful service that allows users to upload
humongous XML files. Castor proved to be too slow for the job and I am now
in the process of re-writing things in JiBX. Though, I know from experience
that users will sometimes upload files that are 99.9% processable, but one
extra XML attribute in an element will render the whole XML incorrect
instead of just that element. I would still like to unmarshall all that I
can in memory and do my validations manually.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to