Reputation: 4234
I have to parse the XML file and build objects representation based on that, now once I get all these data I create entries in various database for these data objects. I have to do second pass over that for value as in the first pass all I could do is build the assets in various databases. and in second pass I get the values for all the data and put it in the database.
I have a feeling that this can be done in a single pass but I just want to see what are your opinions. As I am just a student who started with professional work, experienced ppl please help.
Can someone who have ideas or done similar work, please provide some light on the topic so that I can think over the possibility of the work and get the prototype going based on your suggestion.
Thanks a lot for your precious time, I honestly appreciate it.
Upvotes: 1
Views: 286
Reputation: 17375
you could take a look at the somewhat simpler 'pull' api called stax instead of using sax (event based).
Upvotes: 0
Reputation: 623
You can also use Apache Licensed http://xmlbeansxx.touk.pl/. It works under Windows and Linux.
Upvotes: 0
Reputation: 982
Beside DOM and SAX parsing, you can use XQuery for querying data from XML files.It is fast, robust and efficient.
You can use Qt Xml module for DOM ,SAX and XQuery, btw it is open source.
Another option is xml - C++ data binding, Here is the link.You can create C++ codes from definition directly.It is an elegant solution.
EDIT:
the latter one is at compile time.
Upvotes: 0