Using %XML.TextReader 3
After checking that the document was parsed correctly, the example...
// Read all elements within the document
While (reader.Read()) {
// ...
}
...starts to read the “nodes” of the document model, in sequential order, by calling the Read method.
The return value of Read is true as long as there are more nodes to read. The example code will loop until it reaches the end of the document.