wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml" Watch "xml" New topic
Author

xml

kalyan kiran
Greenhorn

Joined: Aug 21, 2001
Posts: 5
Hi,
I have got a jsp page and a list of records are being displayed in the jsp page and now i have three options insert delete and update. if i click delete it should go to the xml file and delete
that particular record and if i say update it update that particular record in the xml and insert means it should append the record to the xml file without modifying the existing one.please let me know on this aspect about how to approach about
regards
kktata
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
You can have two approaches for this.
1. Client Side Manipulation.
I think you can use Javascript and DOM parser to manipulate the XML file and once the user exits the page you can send the whole XML file to server for archiving it on Server.
2. Server Side Manipulation.
Simple, use the same DOM parser and update the XML source through the API available. In this case everytime the client chooses an operation it has to send the data to server to update.
While choosing the Parse you have to use DOM one, cuz you can't add, delete or modify an XML file using SAX parsers.
I think this is a generalised solution for your query. If yu need a specific one please ask.
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform


SCJP, SCWCD
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Call me a pessimist, but I never trust the user. I would go with the server side option unless maybe someone here at the Javaranch can convince otherwise
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml
 
Similar Threads
NX: URLyBird Database Record Number Question
How to make a MVC update control
Unit testing class that deals with file I/O
how can i change my locale programatically?
URLyBird: Question about update e delete methods