my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes Iterating a java NodeList 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 "Iterating a java NodeList" Watch "Iterating a java NodeList" New topic
Author

Iterating a java NodeList

Dorothy Taylor
Ranch Hand

Joined: Nov 26, 2007
Posts: 104
Hi

Java 7 does not provide iteratable NodeList. I checked on forums and created an interface like this :


Next in my Java class I had as below:


However, the above code gives me an exception at the point of cast:


Could anyone please suggest how to fix this. Infact I am not even importing apache library. I dont know why apache is throwing exception
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Iterating a java NodeList
 
Similar Threads
Implementing a Java interface at runtime
help with web service to display xml file contents using netbeans
which of following is Best way to Code?
NX:contractor - stubs
Strange behaviour with CachedXPathAPI