Hi I'm just getting into XML parsing myself and I'm probably way behind you in this, however I Think you ask for the wrong information. Try asking for the classnames of these childnodes and put them in spendList instead of the nodeName Property.
The nodeName Property
The nodeName property specifies the name of a node.
•nodeName is read-only
•nodeName of an element node is the same as the tag name
•nodeName of an attribute node is the attribute name
•nodeName of a text node is always #text <---------------------This is what you are doing
•nodeName of the document node is always #document
Note: nodeName always contains the uppercase tag name of an HTML element
I hope this helps somewhat.