Many people have been asking, lately, for a post clarifying how to gather data from WoW objects/units/players/whatever. I've attempted to make it a little more clear in this post: Clarification of Object Data « Shynd’s WoW Modification Journal
As always, hope it helps someone.