aspose file tools*
The moose likes XML and Related Technologies and the fly likes how to check the entered value present in XML file or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to check the entered value present in XML file or not" Watch "how to check the entered value present in XML file or not" New topic
Author

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

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Mar 30, 2010
Posts: 350
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

Joined: Jul 20, 2005
Posts: 10113
    
165

I haven't understood the question, but this looks more like Javascript to me, than XML. Am I right?

[My Blog] [JavaRanch Journal]
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
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

Joined: Jul 04, 2010
Posts: 15
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to check the entered value present in XML file or not