0

I'm wondering if there is a way to validate xml field by field in java. I have an app that allow to read xml file, change data and save new xml file. I have to validate changed data, and show which field is wrong. I know i can validate the whole file, but i need to know which specific field is wrong.

Do you know the way to do this? :)

Liam
  • 53
  • 9
  • http://stackoverflow.com/questions/15732/whats-the-best-way-to-validate-an-xml-file-against-an-xsd-file – alex Oct 21 '16 at 07:46
  • I know how to validate xml file, but it doesn't say which field is filled wrong... – Liam Oct 21 '16 at 07:59
  • yes, but validation exception contains the reason or not? – alex Oct 21 '16 at 08:28
  • yes, but the user won't understand what the error say. I want to automatically point the wrong field. – Liam Oct 21 '16 at 08:46
  • you will have to handle the error and create a readable error message by your own. – alex Oct 21 '16 at 10:50

0 Answers0