I have an XML with Three nodes in it say name, last name, salary now i need to do validation on the same. Assume some validation and there results an error for all three nodes(different) now i want to throw one single error stack (custom error ) logging all the three issues of why it failed say (1) name is not currect 2) last name is not correct 3) salary is not currect). is this achivable in java ? i.e to log all the error messages that are present during processing at one time.
as Per my understanding in java if there results an abnormality during the execution then it terminates the further execution and it throws the exception (exception for the first XML node) it does not append the other two error messages in my case for last name and salery.
use JAXB to convert xml to java object(unmarshalling) and then validate the attribute. do you want to show the group of error message? then if one validation fails dont throw a particular error. instead validate all the fields and put the error messages in a container like ArrayList, then show those message to user!