System.Xml.XmlReader.IsStartElement Method

Calls XmlReader.MoveToContent and tests if the current content node is a start tag or empty element tag.

Syntax

public virtual bool IsStartElement ()

Returns

true if XmlReader.MoveToContent finds a start tag or empty element tag; false if a node type other than XmlNodeType.Element was found.

Exceptions

TypeReason
System.Xml.XmlExceptionAn error occurred while parsing the XML.

Remarks

This method skips white space, comments, and processing instructions until the reader is positioned on a content node. The method then tests if the current node is an element.

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