This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Is there any function to which i can find a particular element in XML Tree. When i use getElementsByTagName under class Document. The return value is NodeList which when i typecast to Node generates an error at run time. Is there any other way Reagrds, Pradeep
hi make sure u r doing this. Nodelist nodes = root.getElementsByTagName("name"); for(int i=0;i<nodes.getLength();i++) { Element elt = (Element)nodes.item(i); } if this doesnt work then you can iterate the entire tree....make use of root.getNodeName.equals("name");u can use recursive call also. HTH, Roopa
Grow your own food... or this tiny ad:
Gift giving made easy with the permaculture playing cards