Reading XML Nodes
As you traverse the XML stream, the XmlTextReader will be a pointer to each node that is encountered. Once the XmlTextReader points at a valid node, there are four pieces of vital information that you can query for: Node Name, Node Namespace, Node Value, and Node Attributes. The XmlTextReader has accessors for each of these properties, but not all of them are applicable to every node type. The node value and node attributes properties are directly dependent on the type of the current node.
The node value property depends directly on the node type. Table 10.2 shows which node types have a value and the actual value that is returned for each. If the node type is not in the list, String.Empty is returned.