XML parsing and storing it in bean while validating against xsd with valid error



Is there any best way to parse xml file and store it in beans while validate it against xsd?

I have a scenario like this.



I have to parse xml file and store the data in java/spring(preferable) beans,which I want to use in my junit class.





What I thought of doing is that I want to restrict the user to write the xml of specific format.So I want to validate the xml file against xsd.

Is there any best API which does this?



xml file is a simple file with nested tags and not too big.



No comments:

Post a Comment