Skip to Main Content
Microsoft® .NET Compact Framework Kick Start
book

Microsoft® .NET Compact Framework Kick Start

by Erik Rubin, Ronnie Yates
August 2003
Beginner to intermediate content levelBeginner to intermediate
600 pages
12h 57m
English
Sams
Content preview from Microsoft® .NET Compact Framework Kick Start

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.

Table 10.2. XML Nodes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® .NET Compact Framework (Core Reference)

Microsoft® .NET Compact Framework (Core Reference)

Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 0672325705Purchase book