Got the answer from forums.sun.com also
http://forums.sun.com/thre
The source of the problem is the "//". It works by changing from "//ChannelName/text()" to "ChannelName/text()" as well. I am curious why "//" doesn't work though. Isn't "//" supposed to be "Selects nodes in the document from the current node that match the selection no matter where they are " (from www.w3schools.com)
Main Topics
Browse All Topics





by: TomLunPosted on 2009-06-08 at 08:27:05ID: 24573092
In your call to getTagValue you pass a Node so the XPath is evaulated with that Node as the initial context. So try passing that XPath ./ChannelName/text/() instead i.e the call should look like em(i), "./ChannelName/text()", -1);
String name = getTagValue(channellist.it