File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to validate an XML document against a xsd file ?

 
Francesco Marchioni
author
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have an xml file loaded in memory (Actually in a String but I can parse it).
I'd like to check the file against an .xsd document (the xml document must respect rules in the xsd file) Does anybody know how to do it in Java?
Thanks a lot
Francesco
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been asked before, so a search on this forum would have helped immediately...
Anyway, here are a couple of resources to try out:
http://www.coderanch.com/t/125376/XML/Validating-XML-against-xsd-schemata
http://bobcat.webappcabaret.net/javachina/faq/xml_java_01.htm#jaxp_sax_Q60
http://www-106.ibm.com/developerworks/edu/x-dw-xvalid-i.html
 
Francesco Marchioni
author
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer. Regards
Francesco
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic