This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Has anyone had any issues with CPU usage when performing schema validation? I am investigating the possibility of this scenario but I am yet to be convinced that this is the case.
The code I am looking over makes use of a JAXP/DOM parser (DocumentBuilder) and applies the schema location by setting it as an attribute. Good details of how this is achieved can be found in to the article below:
The code seems to be constructed sensibly enough, however I was wondering what the thoughts were of schema validation, with regards to the best parser to use in that circumstance? SAX or DOM? Would SAX always be faster? The XML document is not particularly large.
Would it be advisable to use a grammer cache instead?