aspose file tools*
The moose likes XML and Related Technologies and the fly likes Dynamically validating xsd Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Dynamically validating xsd" Watch "Dynamically validating xsd" New topic
Author

Dynamically validating xsd

Jack Thomson
Greenhorn

Joined: Nov 14, 2002
Posts: 5
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

Joined: Jul 13, 2001
Posts: 3150
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 ?


Spritle Software Blogs
Jack Thomson
Greenhorn

Joined: Nov 14, 2002
Posts: 5
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...
 
Don't get me started about those stupid light bulbs.
 
subject: Dynamically validating xsd