Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Sometimes, I have to check the validity of some big xml files against a xsd file. The biggest xml file I received had a size close to 1.5GB. xmllint took all my RAM and almost all the swap space, for a total memory usage of 18GB. Consequently, the validation process lasted for 24 hours.

My question: Is there an alternative to xmllint --schema that consumes less memory, perhaps making use of some streaming features instead of loading the file to memory?

share|improve this question
    
was that using the xmllint --stream option? –  bkent314 Sep 19 '13 at 16:56
add comment

1 Answer

up vote 2 down vote accepted

I did not test these validators, but from the top of my mind / little search:

  1. XMLStarlet - can be used for other things as well
  2. msv - Sun multi schema validator
  3. HaXML - haskell xml tools contains command line utilities (one is a validator)
  4. xsltproc should also verify documents at startup

There are plenty more option as most utilities will automatically validate the xml document, like e.g. xsltproc.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.