> >> xpath.count returns weird numbers. I still don't understand what it's >> counting. > > Could you expand on this. Do you mean xpath.length (there isn't a count > method)? One thing that the docs don't make clear is that the fine method > can return a set of nodes, or it can returns immediate values like numbers, > boolean, string (that's just the way xpath works). Maybe that is the issue? >
I should not have used count. I meant size. xpath.size does not give you the number of nodes as far as I can tell. Maybe it's meant to work that way. I have also learned that find_first can return a nil which is useful for testing but find doesn't. Again this is probably all the way it's supposed to work I was just confused. >> when you get a node and iterate over it the first node is sometimes >> blank. It's better to use each_element. > > That sounds like a bug. Do you have a test case by chance? I don't know if I can get at the same XML document that was giving me problems. If I run into it again I'll file a bug report for sure. _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel