Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML validation

 
Kejal Shah
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given an XML and an XML Schema, what's the best technique to validate the XML using Java?

Tx in adv
Kejal
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the JAXP API. The version that comes with Java 1.5 can do validation using schemas; if you have an older version of Java you can download the latest JAXP from dev.java.net.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic