• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

add, edit xml record using jsp

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can Create xml. But How can I edit the xml. Any need to use xml parser?
give me some samples. Thanks
 
Bear Bibeault
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, ok I've moved this to the XML forum.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out jaxb 2.0. It is very easy to read and write xml nodes without knowing xml.

Regards
Balaji
 
This is my favorite tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic