It would be more helpful if you posted a sample of the xml.
If each user is represented by a <viewer> node and all viewer nodes are within a <list> node then you want to lookup myXML.list.viewer.length()