Skips the children of the current node.
Assemblies: System.Xml (in System.Xml.dll)
System.Xml.ReaderWriter (in System.Xml.ReaderWriter.dll)
In the following XML input if the reader is positioned on the <a> node or any of its attributes, calling Skip positions the reader to the <b> node.
If the reader is positioned on a leaf node already (such as the <x> node or the text node abc), calling Skip is the same as calling Read.
<a name="bob" age="123"> <x/>abc<y/> </a> <b> ... </b>
This method checks for well-formed XML.
If the reader is an XmlValidatingReader, this method also validates the skipped content.
The XmlReader implementation determines whether or not the Skip method will expand external entities. The following table describes whether the external entities are expanded for the various types of XmlReader objects.
Type of XmlReader
Expands external entities
For the asynchronous version of this method, see SkipAsync.
The following example parses an XML file starting on the second book node.
The example uses the file, 2books.xml, as input.
.NET FrameworkSupported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
XNA FrameworkSupported in: 3.0, 2.0, 1.0
Portable Class LibrarySupported in: Portable Class Library
Supported in: Windows Phone 8.1
Supported in: Windows Phone Silverlight 8.1
Supported in: Windows Phone Silverlight 8