Sams Teach Yourself .Net in 21 Days
- Table of Contents
- Copyright
- About the Author
- About the Technical Editor
- Acknowledgments
- We Want to Hear from You
- Introduction
- Week 1: At a Glance
- Day 1. Introduction to the Microsoft .NET Framework
- Day 2. Introduction to Visual Studio .NET
- Day 3. Writing Windows Forms Applications
- Day 4. Deploying Windows Forms Applications
- Day 5. Writing ASP.NET Applications
- Day 6. Deploying ASP.NET Applications
- Day 7. Exceptions, Debugging, and Tracing
- Week 1. In Review
- Week 2: At a Glance
- Day 8. Core Language Concepts in Visual Basic .NET and C#
- Day 9. Using Namespaces in .NET
- Day 10. Accessing Data with ADO.NET
- Day 11. Understanding Visual Database Tools
- Day 12. Accessing XML in .NET
- Day 13. XML Web Services in .NET
- Day 14. Components and .NET
- Week 2. In Review
- Week 3: At a Glance
- Day 15. Writing International Applications
- Day 16. Using Macros in Visual Studio .NET
- Day 17. Automating Visual Studio .NET
- Day 18. Using Crystal Reports
- Day 19. Understanding Microsoft Application Center Test
- Day 20. Using Visual SourceSafe
- Day 21. Object Role Modeling with Visio
- Week 3. In Review
XML in .NET
Visual Studio and the .NET Framework have built-in support for designing schemas, editing and creating XML files, and a complete set of class libraries for writing applications that need to read and write XML.
The core XML classes in .NET are compliant with the W3C standards for XML, XSLT 1.0, XPath 1.0, DOM Level 1 and DOM Level 2, namespaces, XSD 1.0, and XSD schema. That compliance means interoperability between different systems isn't an issue.
In .NET, all XML-specific classes are in the System.Xml namespace. The System.XML namespace is a complete XML parser with extensible classes that enable you to work with XML in any number of ways. The abstract XmlReader, XmlWriter, and XmlDocument classes provide parsing, reading, writing, and validation for XML documents, respectively. The XslTransform and XPathDocument classes provide XSLT stylesheet transformation capabilities. Using the DataSet class in ADO .NET, you can create Dataset containers that can read and write XML documents and XML schemas by using the XmlReader, XmlWriter, or XmlDocument classes. Using the DataSet class to work with XML documents is extremely simple and efficient.
Figure 12.1 puts the different classes in the System.XML namespace in perspective.
Figure 12.1 XML objects in the System.XML namespace.
Before getting into the specific classes you can use to manipulate XML documents, you learn how to use the tools in Visual Studio .NET to create and edit XML schemas and XML documents.
Using the XML and Schema Designers | Next Section

Account Sign In
View your cart