O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XmlReader

The .NET Framework does not provide a SAX parser implementation. While the SAX API is the de facto standard for event-driven XML processing in Java, Microsoft has chosen a fundamentally different approach for .NET.

As a SAX parser processes XML input, application callbacks are used to signal events such as the start or end of an XML element; this approach is considered a push model.

The .NET approach, based on the abstract System.Xml.XmlReader class, provides a pull model, wherein the application invokes XmlReader members to control how and when the parser progresses through the XML document. This is analogous to a forward-only cursor that provides read-only access to the XML source. As with SAX, XmlReader is a noncaching parser.

The .NET ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required