>Would I have to read my XML recordset as a DOM object, parse it into these JAXB setters? You shouldn't need to make it to a dom tree to bind the data to your class... jaxb unmarshaller should do it for you.
Nevertheless, if your xml documents are tagged like what you've shown, you need to properly annote the classes further. This is what I see that needed done by just browsing through your Item class.
Since the XML input with names catalog_num, catalog_descrip are field names, it is a requirement that the xml output maintains the xml element names in the xsd. So, I would need to maintain the xml element names: code, name, price. I would need a result like below:
If I understand the scope of the problem correctly, it is that your xml input to be unmarshalled is constructed with tags like inventory, catalog_num,... etc. And that, you want to provision anotated classes that bind to it. Whereas, you want, after doing whatever such as editing or else with the pojo, marshal it to output xml document with tags like Item, code,... etc.
You can do this with two sets of classes (compiled from two set of .java). One with annotations including name="inventory" etc (within the package "items.exec"), and the substantively the same set of classes but without additional annotations of name (like what of your original post within another package "generated" or whatever.
Hi Karen Jonathon, I am glad you've got the essense of the idea and the layout is in fact quite good in putting the idea to test. That shows you know the business. But, there are some bridging ideas that I have not mentioned and they are not very much expanded in the official demo implementation of jaxb, leaving so much to desire.
>I have 2 packages, the items.exec - that have the annotations. And generated, that do not have annotations. The main bridge one has to build is to convert a JAXBElement from one package (type) to another. Without such conversion, it would result in error you've mentioned. That is inevitable.
To do the conversion, there are at least two ways to do, all need coder to do the hard work and no easy support from the library.
 One is to use JAXBSource() and JAXBResult() together with Marshaller/Unmarshaller. However, I just make a quick check on the documentation to discover that JAXBSource() actually implicitly use marshal() method for the purpose. That makes early use of Xml annotations resulting in impracticality of this method in converting the object from package items.exec to generated. So this channel is unfortunately a no-go.
 The other channel I would think of is to use cloning and casting. But, unfortunately, it seems functionality in that area is till left empty. Figuratively, there is not implementation of some sort of deep-copy of object of one package to another to make the conversion. Hence, that makes the coder the only choice to do it the hard way. This is the demo of how it can be done. For complicated object modelling, it is, I confess, quite too much work to make it attractive.
The approach allows one to massage the concepts in a broad sense, whether it is practical, it is left to each one to evaluate.