Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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? – Brian Kent Sep 19 '13 at 16:56
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

Your Answer


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.