Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Validating an XML fragment against a schema..

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Just wondering if there's a handy tool out there (on the web etc) that enables an XML fragment to be validated against a schema ?
I do realised I could write a SAX/DOM java class which would validate it one against the other but was wondering if there's a tool on
the web (maybe soapUI or something like it) that currently exists ?

Any help would be great.
Thanks, Ro
 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

XMLSpy is one of the tools which you can use. But I vaguely remember about an eclipse plugin which is freely available that can be used for this purpose. Recenly I used Oxygen XML for an evaluation period of 30 days and it is pretty cool.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
While XMLSpy and Oxygen are excellent tools, all you need in this situation is Eclipse.
Make sure that you have specified the schema location in your XML document, then right-click on the XML document or in the editor of the XML document and select Validate.
It will validate your XML document against the XML schema.
Experiment with some illegal data in the XML document to see that validation fails.
Best wishes!
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ronan,

There are web tools, such as XML Schema Validator or the official W3C Validator for XML Schema.

Regards,
Dan

 
I think she's lovely. It's this tiny ad that called her crazy:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic