• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in deleting the file

 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
in my project...i need to do delete operation..i developed one XML file...when i do delete..it is deleting the whole information in the xml file....what ever value i enter in the jsp page it should take that value and do delete operation...for deleting i wrote servlet coding...here is my code...can anyone help me where i wrote wrong...

delete.java



thanks,
madhu.
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anyone help me im waiting for the reply..where my code goes wrong..
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Madhu,

Just comment out this

and change this line

to

in delNode function...
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
thanks for your reply..i tried it is deleting only one line...in my xml file i need to delete whatever pack name entered...it should delete..here im attaching my xml file..if you see my xml file you'll see <MA98>,<MA99>,<MA03>..i need to delete <MA03> means that file should not be there..can you tell me where to do

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my xml file



 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
prasad have you seen my xml file and suggest me how to do for deletion of 'Pack 1 or other packs'...
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For that, You need to have a for loop inside if (child.getNodeName().equals(filter)) and get all its child elements one by one and delete them...
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kk..i'll try i had another doubt..is i had done modification..but the modification is happening at the end of my xml file...but i need is i used to enter the 'Pack Name' in jsp page..by taking that 'Pack Name' it should check and it should do modification at that pack place...i had used for loop..but im unable to get it...here is my code..for modification

modify.java



can you check it and provide me where to do changes..
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
prasad have you got my problem
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya.. I have got what your problem is, but please be limited to one problem in a topic and for every other problem, create a new topic for new discussions, so that, you may get other ranchers responses also...
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
k
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Sorry but my response is not related to your problem. But I was wondering why this method signature is like this? I mean bunch of parameters? Why dont you have a single or some less number of objects which contains these parameters? You are forcing method users to type all the parameters (I know now its private method)?
reply
    Bookmark Topic Watch Topic
  • New Topic