XmlTextReader reader = new XmlTextReader("file.xml"); while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { reader.Skip(); } }
XmlTextReader reader = new XmlTextReader("file.xml"); while (reader.Read()) { if (reader.NamespaceURI == "http://www.example.com/schema") { reader.Skip(); } }Package Library: The XmlTextReader class is part of the System.Xml namespace, which is included in the .NET Framework Class Library. Therefore, the package library for this class is the .NET Framework.