After creating an instance, you simply call the Read method of the class to read the document. Reading an XML file Getting Node Information The Name Property returns the name of the node with the namespace prefix, and the Local Name property returns the name of the node without the prefix. The Value property returns the value of a current node. So if you call the Move To Content method, it skips other types of nodes besides the content type nodes.The Read method starts reading the document from the root node and continues until Read returns false, which indicates there is no node left to read in the document. you can even get the level of the node by using the Depth property, as shown in this example: Which defines the type of a node. For example if the next node of the current node is Dxl Declaration, or Document Type, it will skip these nodes until it finds a content type node.
If there is no base URI for the nodes being returned (for example, they were parsed from an in-memory string), String. When any external reference is read (such as expanding an entity in a document type definition (DTD) file or reading a schema file) the encoding property is set to the encoding value of the external reference.This article provides an overview of the most important of these classes, and some examples of what you can do with them. NET applications, you use the Xml Text Reader class to parse XML documents. NET Framework provides full XML Document Object Model (DOM) support and Simple API for XML (SAX) classes, XML readers and writers present an excellent balance of execution speed, memory footprint, productivity, and ease of use for XML developers. NET Framework, you implement XML DOM classes on top of readers.This article explained about the XML document, XSD schema, and how to validate XML document against XSD schema using Microsoft . The XML Schema Validator checks if a given XML document is well formed and has a valid schema model.