Saving a the contents of string in a xml and reading the xml file again
I have a HTML page which contains users data and the data is stored in tags, I have selected particular div tags and saved as a string using java servlet now I need to save those strings in a xml file. I am newbie to java I was able to generate a xml file and add some contents to it, it was experimental project.
In the real time I have the above scenario and once I store the store those strings in a xml I need to read开发者_如何学运维 that back and present it as HTML to the broswers
You can use Java Architecture for XML Binding
(JAXB).
You can create simple POJO file with all the properties of User.
Reading and writing is done on the back hand by JAVA.
A very simple JAXB tutorial is available here.
You can find many other useful articles on web.
精彩评论