This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Validating Schema. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Validating Schema." Watch "Validating Schema." New topic
Author

Validating Schema.

Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
Please advise the best approach to validate the XML schema. As per my knowledge, XML can be validated against XSD rules using Xerces parser.
Also, let me know like similar to XML schema structure do we have a schema for CSV format and if yes does java provides a way to validate it.
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

Eshwar Prasad wrote:Please advise the best approach to validate the XML schema. As per my knowledge, XML can be validated against XSD rules using Xerces parser.


That is correct. XSD/DTD is the dictionary or the standard against which you validate your XML. Earlier, DTDs were used for the same. Read this for the differences between the two.

Eshwar Prasad wrote:Also, let me know like similar to XML schema structure do we have a schema for CSV format and if yes does java provides a way to validate it.


I stumbled upon this, a free tool for creating CSV schema with user defined rules. Not sure if Oracle Java itself provides a separate package for this purpose. Apache though has a library. Check this.


~ Mansukh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Validating Schema.
 
Similar Threads
validating xml file with xsd
XML validation
validation
XMLBeans API - Validation w/ XML Schema
Howto validate xml schema?