Attached is the short tutorial on XSD taken from one online resource mentioned in the document itself.
If need more details then visit the given link. Will attach some samples of xsd later.
http://www.w3schools.com/schema/default.asp
If need more details then visit the given link. Will attach some samples of xsd later.
http://www.w3schools.com/schema/default.asp
xsd_tutorial.docx | |
File Size: | 149 kb |
File Type: | docx |
Ok...if you have gone through the attached tutorial file then check the attached XSD files.
I will take the JAXB code for these XSD later. Also attached is the xml file sample for the main XSD - trade.xsd
I believe that all the XSDs are covered in the generated xml for trade. Just check it once.
I will take the JAXB code for these XSD later. Also attached is the xml file sample for the main XSD - trade.xsd
I believe that all the XSDs are covered in the generated xml for trade. Just check it once.
trade.xml | |
File Size: | 4 kb |
File Type: | xml |
xsd.zip | |
File Size: | 7 kb |
File Type: | zip |
Below are the java files to provide the dummy data to create the xml file for trade.xsd. You can generate the jaxb classes in eclipse, so have not attached those classes here. Just download these & execute them to understand some features of xsd & jaxb. I have just provided these so that you should not need to create the basic structure to explore further. Enjoy :)
creators.zip | |
File Size: | 4 kb |
File Type: | zip |
processors.zip | |
File Size: | 0 kb |
File Type: | zip |
binding.xml | |
File Size: | 0 kb |
File Type: | xml |
Below file can be used to save & read the xml data from Oracle database. You need to create your own connection to database. To execute the below class you will also need to download jars - xdb.jar, xmlparsev2.jar, ojdbc6.jar
sqlxmls.java | |
File Size: | 2 kb |
File Type: | java |
Below java file can be used to read the above trade.xml if you are not having xsd for that xml but want to read value of a particular tag. Below I am fetching the first name of client & so have used the break point if reader is going outside client details. Similarly you can tweak it to suit your requirement. No XMLPath is used here, on this will paste the sample code next time.
xmlreader.java | |
File Size: | 1 kb |
File Type: | java |