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

Dynamically validating xsd

 
Jack Thomson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My task is to create a gui which will allow the user to select a xsd file and then create an xml file which will be successfully validated by the selected xsd file.

To do this, I need to be able to find out what the legal values of a selected element are and what are the legal child elements it can have etc. (And a whole load of other stuff as well...)

Is it possible to do this ? And if so, how ?

Thanks in advance.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch Jack.

You can feed your XML and XSD to the exisiting validating parsers likes Xerces, Sun MSV and let them do the job of checking the element hierarchy, values etc.,

Hoep that helps ?
 
Jack Thomson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

But I actually need to be able to do stuff like create a combobox containing the legal child values of an element...

So I need to find a way to find out info about the schema that's been selected...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic