Java approach for XML Validation -



Java approach for XML Validation -

i want validate xml tag values in java.

scenario: suppose have info follow

elements: element1, element2, element3, element4, element5 values: value1, value2, value3, value4, value5, value6, value7, value8 next possible combinations have validate: 1. element1 can have value1/value2 ( element1->value1/value2 ) 2. element2 can have value3/value4 ( element2->value3/value4 ) 4. element3 can have value5 if element1 has value1 ( element3->value5 if element1->value1 ) else element3 can have value6 if element1 has value2 ( element3->value6 if element1->value2 ) 5. element4 can have value7 if element1->value1 , element2->value4

i can have hard-coding of requirement in 1 java file want flexible approach wherein if in future new status comes image can added.

i thought of hibernate validation later on came know supported java 6 , above. constraint have utilize java 1.5

please suggest appropriate approach fulfill above requirement. link suggestion work.

note: schema validation beingness carried out.

explore schematron applying business rules on xml data

schematron project site - http://www.schematron.com

introduction tutorial - http://www.dpawson.co.uk/schematron/introduction.html, see element element constraints in tutorial

one more tutorial - http://www.xml.com/lpt/a/1318

java xml hibernate validation xsd

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -