The Programming Interface of Readers

XmlReader is an abstract class available from the System.Xml namespace. It defines the set of functionalities that an XML reader exposes to let developers access an XML stream in a noncached, forward-only, read-only way.

An XML reader works on a read-only stream by jumping from one node to the next in a forward-only direction. The XML reader maintains an internal pointer to the current node and its attributes and text but has no notion of previous and next nodes. You can’t modify text or attributes, and you can move only forward from the current node. If you are visiting attribute nodes, however, you can move back to the parent node or access an attribute by index. The visit takes place in node-first order, ...

Get Applied XML Programming for Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.