Xmlvalidatingreader sample code Cheap mobile sex numbers
Every time a new node is read, the switch statement checks its type against members of the Xml Node Type enumeration.
I haven't included the cases for every possible node type, but only those that occur in the sample document.
It does this by reading forwards through the document, recognizing elements as it reads.
The second consequence is slightly more subtle: elements are read and presented to you one by one, with no context.
Also notice that nodes of type Xml Node Type:: Whitespace are simply discarded.
The file contains plenty of white space to make it readable to humans, but the Cpp Text Reader program isn't really interested in white space, so the program prints nothing when it encounters a white space node.
Note that Xml Text Reader isn't limited to reading from files.
Alternative constructors let you take XML input from URLs, streams, strings, and other Text Reader objects.