>I had the understanding that any node could contain text, so how is a 'text node' different?
A "text node" in the technical sense will be characterised by its type attribute (3). The salient feature of it is that it can only be a leaf of the document tree. It is incapable of having other nodes as its children.
>In this example, is <name> an element or text node?
<name> is an "element node". It's node type attribute returns 1.
>Also, at the simplest level, is this how one would store the name? Or would one use an attribute of the <name> thing to store the actual name and put nothing in-between the start and end tags?
It is equally viable and one should not let one preference dictate over the other.
For "data-oriented" store and as simple (atomic) a data as a name---whatever it means---use an attribute would have some minute gain in processing time which might add up. But for some structured data, the data would need a element tree of its own to make a sense out of it which is better suit to reflect a hierarchical relation. Using attributes would mean a flat structure less apt to reflect the hierachical relation among them. A flat attribute collection might soon be getting out of control if more sophisticated info needed to be added as attribute nodes like text nodes are leaves incapable of containing other nodes. There really is no definite answer to the question. So, at the simplest (atomic) level, it is the use of attribute for "data-oriented" store. But, it is less readable and readability very often is an important factor to make the choice. I wouldn't be surprise attribute will not be preferred in this case for a data semantically of such a need to being standing-out as the name of a person say.
However, priority would be quite different for "content-management-oriented" store where a lot of mixed type elements would be present. There the contents most probably need to be stored in the text nodes and attributes be relegated to marginal or stylistic info intermixed within stylistic or semantic elements.
There are also many factors influencing the management decision, like readability and ease of maintenance.
I make no pretention on each and every of the above matters.