简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM