System.Xml.XmlReader.ReadStartElement Method

Checks that the current content node is an element with the given XmlReader.LocalName and XmlReader.NamespaceURI and advances the reader to the next node.

Syntax

public virtual void ReadStartElement (string localname, string ns)

Parameters

localname
The local name of the element.
ns
The namespace URI of the element.

Exceptions

TypeReason
System.Xml.XmlExceptionThe node is not an Element node, the XmlReader.LocalName property of the Element node does not equal localname, the XmlReader.NamespaceURI property of the Element node does not equal ns, or an error occurred while parsing the XML.

Remarks

A call to this method corresponds to a call to XmlReader.IsStartElement followed by a call to XmlReader.Read.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0