Visual Studio

Programming with XML in the Microsoft .NET Framework
(Microsoft Training Course: 2663) - 3 days - £1700 exc VAT

> Target Audience
This three-day instructor-led his course teaches developers how to program with XML in the Microsoft .NET Framework in order to build Microsoft Windows or Web-based integrated applications that are easier to build, scalable, and flexible.
It is intended for Programmers who build Web-based or Windows applications that access data, Programmers who build Web services and Programmers who build applications that access data stored as XML
> Course outline
  1. Introduction to XML in the .NET Framework
  2. Parsing XML
  3. Validating XML
  4. Writing XML
  5. Querying XML
  6. Manipulating Cached XML
  7. Transforming XML
  8. Serializing Objects as XML

Module 1: Introduction to XML in the .NET Framework
  • Overview
  • Course at a Glance
  • Common Business Problems
  • XML in the .NET Framework
  • Explain how XML provides solutions to common business problems.
  • Discuss how Microsoft's implementation of W3C standards for XML provides a framework for XML solutions to business problems.
  • Diagram XML support in the .NET Framework.
Module 2: Parsing XML
  • Overview of XML Parsing
  • Parsing XML Using XmlTextReader
  • Creating a Custom Reader
  • Lab: Building an XML Web Service to Parse XML
  • Create a Stream object from an XML file.
  • Build a mutable string by using the StringBuilder object.
  • Handle errors in the form of XML.
  • Parse XML as text by using the XmlTextReader object.
  • Create a custom XmlReader object
Module 3: Validating XML
  • Examining Schemas
  • Validating XML While Parsing
  • Advanced Validation
  • Lab: Extend an XML Web Service to Validate XML
  • Instantiate an XML validating reader.
  • Associate one or more XML schemas with an XML validating reader.
  • Handle errors that result when a validating reader processes invalid XML.
  • Create an application that uses the .NET Framework XML classes and XML schemas to validate an XML fragment.
  • Resolve a Uniform Resource Identifier (URI) reference to a schema or DTD.
  • Create an application that uses the .NET Framework XML classes and an XSD schema or a DTD to validate well-formed XML.
Module 4: Writing XML
  • Overview of Generating XML Documents
  • Writing XML
  • Generating XML with Namespaces
  • Controlling XML Format and Converting XML
  • Lab: Building an XML Web Service to Write XML
  • Use the XmlTextWriter class to write well-formed XML.
  • Generate namespaces for elements and attributes.
  • Control indentation and other code format characteristics when generating XML.
  • Write XML that preserves characters that are normally represented by using escape characters.
Module 5: Querying XML
  • Introduction to Querying XML Using XPath
  • Creating and Navigating a Document Cache
  • Executing Your Query
  • Lab: Creating and Loading an XML Data Cache
  • Lab: Compiling and Executing Queries That Return Nodes
  • Lab: Compiling and Executing Queries That Return Numbers
  • Lab: Compiling and Executing Queries That Return Strings
  • Describe the business reasons for querying XML documents by using XPath.
  • Cache XML data for querying by using an XPathDocument object.
  • Create an XPathNavigator object to navigate through an XML document.
  • Compile and evaluate the result of an XPathExpression object.
  • Iterate through an XmlNodeList object returned by an XPath expression.
Module 6: Manipulating Cached XML
  • Introduction to the XML Document Object Model
  • Navigating XML Using the DOM
  • Creating New Nodes
  • Modifying and Deleting Nodes
  • Lab: Loading an XML Document
  • Lab: Navigating an XML Document
  • Lab: Adding Elements and Comments to an XML Document
  • Lab: Modifying and Deleting Information
  • Open and save XML by using the DOM.
  • Locate XML by using the DOM.
  • Create nodes in the XML node tree.
  • Modify and delete nodes in the XML node tree.
Module 7: Transforming XML
  • Introduction to Transforming XML
  • Programmng the XslTransform Class
  • Extending XSLT Style Sheets
  • Lab: Applying a Style Sheet
  • Lab: Using Style Sheet Parameters
  • Lab: Extending a Style Sheet with an Extension Object
  • List the business use cases for using XSLT.
  • Describe the transformation process.
  • Apply style sheets to XML documents by using the XslTransform class.
  • Display XML by using the ASP.NET Xml Web Forms control.
  • Pass parameters to XSLT style sheets.
  • Apply a style sheet that references an extension object.
Module 8: Serializing Objects as XML
  • Introduction to XML Serialization
  • Serializing Objects Using XmlSerializer
  • Controlling XML Serialization
  • Lab: Serializing a Purchase Order
  • Lab: Controlling Serialization with Attributes
  • Lab: Deserializing an Invoice
  • Define XML serialization.
  • Serialize and deserialize objects by using the XmlSerializer class.
  • Control XML serialization by using attributes.
> Pre-Requisites
Before attending this course, students must have the following pre-requisites:
  • Experience with programming languages such as Visual Basic .NET or Microsoft Visual C#.
  • Experience using the Microsoft Visual Studio .NET developer environment.
  • Experience building applications using the Extensible Stylesheet Language for Transformation (XSLT), XML Path Language (XPath), and XML schemas
> Purpose
At the end of this course, students will be able to explain how XML is integrated into the .NET Framework and the classes associated with XML in the .NET Framework; parse and read XML in the .NET Framework; write and validate an XML document; manipulate cached XML documents in memory; query XML documents; transform XML documents; create new XML schemas programmatically