| Author |
add, edit xml record using jsp
|
Edward Durai
Ranch Hand
Joined: Oct 09, 2004
Posts: 223
|
|
Hi, I have one jsp page contains 4 check boxes like create, view, update and search. if i check selected fields should be stored in below format. And if i want to edit the field, i want to edit the field. How? pls send yours suggestions Thanks <FIELD_LIST> <FIELD F_ID="0" Create="0" View="1" Update="0" Search="1"/> </FIELD_LIST>
|
Thank You<br />Edward
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
Simply submit the form in the JSP to a servlet that gathers the request parameters and creates the XML snippet. I'm not sure what the issue here is, it's a pretty straight-forward operation.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Edward Durai
Ranch Hand
Joined: Oct 09, 2004
Posts: 223
|
|
I can Create xml. But How can I edit the xml. Any need to use xml parser? give me some samples. Thanks
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
|
Ah, ok I've moved this to the XML forum.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
How can I edit the xml. Any need to use xml parser?
Yes, you will need to have the XML to be edited in memory as a DOM if you want to change the values and/or structure. This can get pretty tricky due to the characters that have special meaning in HTML pages and XML documents. I think we have had related discussions here before, you might search the archives. My suggestion is that you first get really comfortable with reading in an XML document, modifying it and writing it back out in a desktop utility to avoid all the extra complexity of JSP. When you have that worked out move to JSP/servlets. Bill
|
Java Resources at www.wbrogden.com
|
 |
Jeya Balaji
Ranch Hand
Joined: Jan 02, 2003
Posts: 40
|
|
Check out jaxb 2.0. It is very easy to read and write xml nodes without knowing xml. Regards Balaji
|
Regards,<br />Balaji
|
 |
 |
|
|
subject: add, edit xml record using jsp
|
|
|