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. I would still like to unmarshall all that I can in memory and do my validations manually.