• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAXB implentation query

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Experts!!!

I've thought of using JAXB for binding xml file buti've one doubt regarding this.....the problem is that , when a xml file is unmarshalled into a Java content tree comprising objects of the classes generated by the JAXB binding compiler,we need to know about the classes and interfaces generated by the jaxb compiler so as to cast it into a proper types ......something like .....
PurchaseOrder po =(PurchaseOrder)u.unmarshal(new FileInputStream( "po.xml" ) );

Consider a situation where we dont know this PurchaseOrder class!!!
My question is how this is possible in a dynamic situation where we dont know about the classes generated.???
Consider a situation wherein i send a xml file in to an engine .There it is validated and its schema and the JAXB classes are generated and then it is unmarshalled.Thats means the development is a two phase process.
(1)First the JAXB classes are generated and compiled and
(2)Second the generated classes are used to process xml content i.e unmarshalling of the xml file.
So my question is how do we come to know about the JAXB generated classes dynamically,when we unmarshalls the xml file unless and untill we look at the schema of the xml or we take a look at the generated classes.

I hope i've succeeded in explaining my doubts and i hope that the experts out would help me out in clearing my doubts.
Waiting for your reply
Many Regards
Ved Gunjan.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic