[Unmarshaller] - How can jaxb be useful without knowing the XSD elements?
I'm new to jaxb. I saw a lot of examples where there was a cast for the object returned from the unmarshaller like this:
Collection collection= (Collection) objFactory.createCollection();
Collection.BooksType booksType = objFactory.createCollectionTypeBooksType();
BookType book = objFactory.createBookType();
This means that Collection is a XSD element and a XML tag and BookType the type of the object contained by Collection. Now I was wondering: how am i suppose to know previously which kind of elements are defined in the XSD that my program will receive? If i don't know this information, is jaxb totally useless?
I'm asking this because I've to develop a program that receives as input a db in xml format with related xsd. According to the xsd, the program will show the db structure to the user that will chose which fields he needs to store in his own db, and in which fields of his own db the data have to be stored.
Thanks to everybody for the help.