Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to check the entered value present in XML file or not

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i had develeped XML file using DOM..i need to do DML operations for that i used jsp page....that means i had taken modify.jsp..in it if i enter 'packName' in textfield...if it is present means it should go to other page otherwise it should throw an alert 'Pack Name doesn't exist'....can anyone help me out...waiting for the reply..here is my code...



the problem with the code is if 'Pack Name exists' it is showing 'Unable to retireve'...even if i enter the wrong 'PackName' it is not showing error....im getting where the code is wrong...

Thanks,
madhu.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you describe the problem more precisely?

Have you verified that (a) the values you think are being sent to the server are being sent, (b) you're getting back the message you expect, and (c) you're always treating packName the same (i.e. trimming etc.)?
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi good morning,
i checked the 'var url = "/proj/gprs/login.xml"; ' is not taking....and i am getting error as



uncaught exception: [Exception... "Component returned failure code: 0x805e000a [nsIXMLHttpRequest.open]" nsresult: "0x805e000a (<unknown>)" location: "JS frame :: http://localhost:8080/proj/script/modify.js :: login :: line 37" data: no]




can you check it and provide me the solution...
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't understood the question, but this looks more like Javascript to me, than XML. Am I right?
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to do 'Modification' in my XML file...for that i m validating the entered field..if the fieldname exists it should go for modification..otherwise it should throw an error...
 
mahammad gouse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
if you are seaching for paricularly for the data in XML. its better to go for SAX parser.
why because its event based searching would be faster and it searches for the particular element is present or not in the XML.

bye
mahammad gouse shaik
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic