XmlReader.Read Method
.NET Framework 2.0
When overridden in a derived class, reads the next node from the stream.
Namespace: System.Xml
Assembly: System.Xml (in system.xml.dll)
XmlReader Members
System.Xml Namespace
Assembly: System.Xml (in system.xml.dll)
The following example reads an XML file and displays each of the nodes.
The sample uses the items.xml file.
<?xml version="1.0"?> <!-- This is a sample XML document --> <!DOCTYPE Items [<!ENTITY number "123">]> <Items> <Item>Test with an entity: &number;</Item> <Item>Test with a child element <more/> stuff</Item> <Item>Test with a CDATA section <![CDATA[<456>]]> def</Item> <Item>Test with a char entity: A</Item> <!-- Fourteen chars in this element.--> <Item>1234567890ABCD</Item> </Items>
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
XmlReader ClassXmlReader Members
System.Xml Namespace
Other Resources
Reading XML with the XmlReaderCommunity Additions
ADD
Show: