|
| To | Do this |
|---|---|
| Parse XML without validation. | Create an XmlTextReader, and pass it the name of a file. Then use the Read method to read nodes from the file. |
| Parse XML with validation. | Create an XmlTextReader, and then use it to initialize an XmlValidatingReader. Create a handler function for validation events, and attach it to the ValidationEventHandler event of the XmlValidatingReader. |
| Work with XML in memory. | Create an XmlDocument, and use its Load or LoadXml function to parse XML into a DOM tree in memory. |
|