1) we need to some times query this xml file, right now I am reading an entire file and verifying the book id to identify the one I want to show.
Is there any way to make this process easier?
Well, there's no easy answer to this question. A lot depends on what this
books file contains. It depends on how large this file is, how frequently you need to search (very frequent I would imagine), how frequently
you should update (not so frequent?). Things of this nature. Each application has its set of challenges.
A lot of these questions can only be answered by your organization. Hence, there is no (generic) ONE answer.
2)Some time I need to update an existing book data too, so if you could let me know to do this 'right' way and tutorials that would be great.
The 'right' way to update can not be known before you have an answer to your first question.
Since you already seem to have a solution, if you could tell us what parser (if at all) you are using then someone could comment on the 'right' way.
Thanks.
- m