XSD creation problem
I have been assigned to create a XSD schema for a proposed XML. i know what tables will be involved and what will be required fields which we 开发者_高级运维always going to expect in the XML as well as optional. I am very new to XSD and don't know where to and how to start.Can any one suggest me how to proceed so that i can start exploring something as currently i am on ground zero with the requirement.
Thanks in advance Umesh
Best place to start off when you are at ground zero is w3schools -
http://www.w3schools.com/schema/schema_example.asp
Check this tutorial for beginners, looks good to me -
http://www.codeguru.com/java/article.php/c13529
The simplest way to start would be download a good XML editor, like XMLSpy and create schema visually. Altova has a free 30-day evaluation for their product, that should be enough for you to crank a first draft of your schema.
Depending on what you application is going to do, you might be able to generate one. For example you mention that your data is coming from (database) tables. If you intend to interact with the database using JPA entities, then you could use JAXB to generate an XML schema from the entity classes:
- http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JAXB/GenerateSchema
If you are using other tools to interact with the database, they may also have schema generation utilities.
精彩评论