Home > Articles > Microsoft > Other Microsoft

Pass the MCAD/MCSD: Learning to Access and Manipulate XML Data

XML is pervasive in .NET. In order to pass the MCAD/MCSD Exam(70-320): Developing XML Web Services and Server Components with Visual C# .NET and the .NET Framework, you need to know XML, starting with this section on accessing and manipulating XML data.
This chapter is from the book

Objectives

This chapter covers the following Microsoft-specified objective for the "Consuming and Manipulating Data" section of the "Developing XML Web Services and Server Components with Microsoft Visual C# .NET and the Microsoft .NET Framework" exam:

  • Access and manipulate XML Data.

  • Access an XML file by using the Document Object Model (DOM) and an XmlReader.

  • Transform DataSet data into XML data.

  • Use XPath to query XML data.

  • Generate and use an XSD schema.

  • Write a SQL statement that retrieves XML data from a SQL Server database.

  • Update a SQL Server database by using XML.

  • Validate an XML document.

Extensible Markup Language (far better known as XML) is pervasive in .NET. It's used as the format for configuration files, as the transmission format for SOAP messages, and in many other places. It's also rapidly becoming the most widespread common language for many development platforms.

This objective tests your ability to perform many XML development tasks. To pass this section of the exam, you need to know how to read an XML file from disk, and how to create your own XML from a DataSet object in your application. You also need to be familiar with the XPath query language, and with the creation and use of XSD schema files.

You'll also need to understand the connections that Microsoft SQL Server has with the XML universe. You need to be able to extract SQL Server data in XML format, and to be able to update a SQL Server database by sending it properly formatted XML.

Finally, the exam tests your ability to validate XML to confirm that it conforms to a proper format. The .NET Framework includes several means of validating XML that you should be familiar with.

Outline

Introduction

Accessing an XML File

  • Understanding the DOM
  • Using an XMLReader Object
  • The XmlNode Class
  • The XmlDocument Class

Synchronizing DataSet Objects with XML

  • The XmlDataDocument Class
  • Synchronizing a DataSet Object with an XmlDataDocument Object
    • Starting with an XmlDataDocument Object
    • Starting with a Full DataSet Object
    • Starting with an XML Schema

Understanding XPath

  • The XPath Language
  • Using the XPathNavigator Class
    • Selecting Nodes with XPath
    • Navigating Nodes with XPath

Generating and Using XSD Schemas

  • Generating an XSD Schema
  • Using an XSD Schema
    • Validating Against XSD
    • Validating Against a DTD

Using XML with SQL Server

  • Generating XML with SQL Statements
    • Understanding the FOR XML Clause
    • Using ExecuteXmlReader() Method
  • Updating SQL Data by Using XML
    • Installing SQLXML
    • Using DiffGrams

Chapter Summary

Apply Your Knowledge


  • Use the XmlDocument and XmlNode objects to navigate through some XML files. Inspect the node types that you find and understand how they relate to the original XML.

  • Use the XmlDataDocument class to synchronize a DataSet object with an XML file. Save the XML file to disk and inspect its contents. Understand how the generated XML relates to the original DataSet object.

  • Use an XPath processor to run XPath queries against an XML file. Make sure you know the XPath syntax to select portions of the XML.

  • Use the methods of the DataSet object to create XSD files. Inspect the generated XSD and understand how it relates to the original objects.

  • Use XML to read and write SQL Server data. You can install the MSDE version of SQL Server from your Visual Studio .NET CD-ROMs if you don't have a full SQL Server to work with.

  • Use the XmlValidatingReader class to validate an XML file. Make a change to the file that makes it invalid and examine the results when you try to validate the file.

  • Review the XML Data section of the Common Tasks QuickStart Tutorials that ship as part of the .NET Framework SDK.

Introduction

You can't use the .NET Framework effectively unless you're familiar with XML. That's true even if you're working only with desktop applications, but if you want to write XML Web Services and other distributed applications, XML knowledge is even more important. The .NET Framework uses XML for many purposes itself, but it also makes it very easy for you to use XML in your own applications.

The FCL's support for XML is mainly contained in the System.Xml namespace. This namespace contains objects to parse, validate, and manipulate XML. You can read and write XML, use XPath to navigate through an XML document, or check to see whether a particular document is valid XML by using the objects in this namespace.

NOTE

XML Basics In this chapter, I've assumed that you're already familiar with the basics of XML, such as elements and attributes. If you need a refresher course on XML Basics, refer to Appendix B, "XML Standards and Syntax."

As you're learning about XML, you'll become familiar with some other standards as well. These include the XPath query language and the XSD schema language. You'll see in this chapter how these other standards are integrated into the .NET Framework's XML support.

sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |