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

Navigating the XML DOM

Now that the XmlDocument is loaded, you can navigate its tree structure. Usually, you'll want to skip the XML declaration and other elements in the prolog and start directly at the root node. This can be done by using the DocumentElement property. This property returns the root element of the node tree.

The XmlDocument can be thought of as a node tree with links both down and up the tree. This allows for navigation in all directions: parent to child, child to parent, and sibling to sibling. The XmlNode abstract base class provides several methods for navigating the tree structure.

Navigating Using HasChildNodes and ChildNodes

The XmlNode provides the HasChildNodes property as an easy way to check whether the node is linked ...

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