For this message the author msi_333 has received gratitude : manniar
Re: Unmarshall From XML using JAXB
Wed Jan 26, 2011 12:43 pm
I think there is a small typo in your example,
I think the code should read, java code
System.out.println ("Student Name is : " + student.getName ()); System.out.println ("Student Age is : " + student.getAge ());
Also it might be worth mentioning that you need to generate the java class from the XSD file you've mentioned. I used the utility plug-in for Eclipse called XJC. Then the code in your example will find the java class for StudentType. Might be obvious for experienced programmers but not for people new to Jaxb.