// create Marshaller using JAXB context Marshaller m = context.create Marshaller(); // To format the [to be]generated XML output Property(Marshaller. TRUE); //Set Schema Schema( schema ); // Marshall the mapped object and write output to [or to a file] m.marshal(university, System.out); m.marshal(university, new File(SOME_FILE)); package com.model; import sax. Marshaller Impl.write(Marshaller Impl.java:317) at xml.v2.runtime. Marshaller Impl.marshal(Marshaller Impl.java:243) at bind.helpers. Abstract Marshaller Impl.marshal(Abstract Marshaller Impl.java:75) at com. Marshaller Impl.write(Marshaller Impl.java:317) at xml.v2.runtime. Marshaller Impl.marshal(Marshaller Impl.java:243) at bind.helpers. Abstract Marshaller Impl.marshal(Abstract Marshaller Impl.java:75) at com.Jaxb Schema Validation.main(Jaxb Schema Validation.java:78) Caused by: sax. Jaxb Schema Validation.main(Jaxb Schema Validation.java:81) Caused by: sax.Last week I was asked to write something in Java that is able to split a single 30GB XML file into smaller parts of configurable file size.The consumer of the file is going to be a middle-ware application that has problems with the large size of the XML.
The requirements are that: So, using binary split tools such as Unix Split is out of the question.This article discusses how to use the XMLSignature Validator class to help you validate the integrity and authenticity of signed messages and downloaded resources.There aren't many off-the-shelf XML signing tools available, so this article also discusses how you can use the AIR ADT tool to create signed resource packages.For the demo code I re-created the schema in simplified form: The header is neglectable in size.A single data element repetition is also pretty small, lets say less less then 50k B.
Alternately, you can use the Java XML Digital Signature API.