0

I am using jaxb marshaling to validate the xml with the xsd... I am dealing with 2 GB of record.

I am getting xsd validation exception in some point of time... When I am dealing with less of amount of data I can easily identify where the data went wrong.

But if its large volume of data its difficult. Can someone suggest me some ideas on this problem.

Raj GT
  • 25
  • 2
  • 8
  • Don't use JAXB. You want to use a streaming way you don't want the full document in memory, you want a stax based implementation. – M. Deinum May 19 '15 at 20:18
  • Thanks for the response. As per the requirement it needs ... Is there any way to show which xsd or which object that is having the issue – Raj GT May 20 '15 at 05:02
  • You can still use JAXB but don't create objects from the whole documents, do it streaming. Use the streaming api this limits memory consumption and you can still do validation. See http://stackoverflow.com/questions/15732/whats-the-best-way-to-validate-an-xml-file-against-an-xsd-file/690450#690450 – M. Deinum May 20 '15 at 06:07

0 Answers0