I have a simple question to ask regarding the xml parsing logic.
My requirement is that i will get an xml file with the feed data of the products. And i want to import it to my database.
For this i am using STAX api for xml parsing.
Now my question is, is there a way that i get a list of objects with all the parsed xml data in those objects.
I have generated Xsds from Xml and from Xsds I have generated java objects.
Now instead of doing that in the code to manually set all the values in the objects and then return the list of objects to the calling api,
i want to know if there is some api available that reads the XSDs and xml and returns me List<objects> with the data in those objects?
There's a variety of Java-to-XML binding tools, yes. Some of them work based on schemas but it's not necessarily a requirement. I don't know if they will work with Stax parsers -- but why is that a requirement?
Joined: Nov 10, 2008
The requirement is that i have a pretty complex xml structure that may change in the future.
So to save time from coding again, we want that the xml be parsed and the list of value objects be returned and we use them directly.
If this can be done via any other xml parsing api other than STAX then please suggest.