|

PROGRAMMING WITH XML IN THE MICROSOFT .NET FRAMEWORK
Introduction
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.
Audience
- This course is intended for the following:
- Programmers who build Web-based or Windows applications
that access data
- Programmers who build Web services
- Programmers who build applications that access data
stored as XML
- This course is not recommended for developers who:
- Want to learn a programming language, such as Visual
Basic .NET or Visual C#
- Want an introduction to XML and related technologies
- Want advanced-level information on developing XML-based
applications
- Want to learn how to program using MSXML or how to program
with XML in Microsoft Internet Explorer 6.0
At Course Completion
After completing 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
Prerequisites
Before attending this course, students must have:
- 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 XSLT, XPath, and
XML Schemas
Microsoft Certified Professional Exams
There is no MCP exam associated with this course.
Course Outline
Module 1: Introduction to XML in the Microsoft .NET Framework
This module introduces how XML in the .NET Framework helps
solve common business problems. XML is a standards-driven
technology that is ideal for applications that use the Internet.
Microsoft's implementation of World Wide Web Consortium (W3C)
standards ensures that applications you develop with XML in
.NET will successfully communicate with other W3C-compatible
applications.
Lessons
- Course Overview
- Common Business Problems
- XML in the .NET Framework
After completing this module, students will be able to:
- Explain how using 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
This module discusses how to parse Extensible Markup Language
(XML) data from a file, string, or stream by using the XmlReader
class. It also covers how to use the XmlTextReader to process
XML as text, and the XmlNodeReader to filter data by using
an XML Path Language (XPath) expression and the object.
Lessons
- Overview of XML Parsing
- Parsing XML Using XmlTextReader
- Creating a Custom Reader
- Lab 2.1: Parsing XML
- Exercise 1: Building an XML Web Service to Parse XML
After completing this module, students will be able to:
- Create an XML 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.
- Parse XML as a set of nodes by using the XmlNodeReader
object.
- Create a custom XmlReader object.
Module 3: Validating XML
This module gives an overview of XML Schema Definition (XSD)
data types, and then covers how to use the Microsoft .NET
Framework XML classes to perform XML schema validation. The
lesson Advanced Validation teaches how to resolve external
entities, how to validate XML fragments, and how to validate
XML by using a Document Type Definition (DTD
Lessons
- Examining Schemas
- Validating XML While Parsing
- Advanced Validation
- Lab 3.1: Validating XML
- Exercise 1: Extend an XML Web Service to Validate XML
After completing this module, students will be able to:
- Create an application that uses the .NET Framework XML
classes and XML schemas to validate well-formed XML sources.
- 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 DTD technology to validate well-formed XML sources.
Module 4: Writing XML
Writing XML is a central skill in developing XML-based applications.
In this module, you will learn about the .NET Framework classes
that you use to write XML with or without namespaces. You
will also learn how to control the format and validity of
XML as it is being written.
Lessons
- Overview of Generating XML Documents
- Writing XML
- Generating XML with Namespaces
- Controlling Format and Validation
- Lab 4.1: Writing XML
- Exercise 1: Build an XML Web Service to Write XML
After completing this module, students will be able to:
- Write application code that controls the written output
of XML.
- Use the XmlTextWriter class to write well-formed XML with
namespaces.
- Generate valid XML.
- Generate XML that is formatted.
- Control how white space is written.
- Write XML that preserves characters that are normally
escaped.
- Generate valid XML.
Module 5: Querying XML
This module explains the process of querying an XML document
by using XPath. It explains how to write code to load an XML
document, and how to create a navigation cursor by using an
XPathNavigator object. It also explains how to create your
query by using an XPathDocument object, and how to examine
the result types. In addition, this module describes how to
compile your query and evaluate your results. Because an XPath
expression can return a set of nodes, you will learn how to
iterate through a set of nodes by using an XPathNodeIterator
object.
Lessons
- Introduction to Querying XML Using XPath
- Creating and Navigating a Document Cache
- Evaluating Your Query
- Lab 5.1: Querying XML Documents Using XPath
- Exercise 1: Creating and Loading an XML Data Cache
- Exercise 2: Compiling and Executing Queries That Return
Nodes
- Exercise 3: Compiling and Executing Queries That Return
Numbers
- Exercise 4: Compiling and Executing Queries That Return
Strings
After completing this module, students will be able to:
- 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
This module introduces the XML Document Object Model (XML
DOM) and explains how to locate and manipulate XML by using
the DOM.
Lessons
- Opening and Saving XML Documents Using the DOM
- Navigating XML Using the DOM
- Creating New Nodes
- Modifying and Deleting Nodes
- Lab 6.1: Manipulating Cached XML
- Exercise 1: Loading an XML Document
- Exercise 2: Navigating an XML Document
- Exercise 3: Adding Elements and Comments to an XML Document
- Exercise 4: Modifying and Deleting Information
After completing this module, students will be able to:
- Open and save XML by using the DOM.
- Navigate 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
This module explains the process of transforming XML documents.
The module teaches the student how to apply an Extensible
Stylesheet Language for Transformation (XSLT) transformation
to an XML document by using the .NET XML classes. It does
not teach XSLT syntax or commands. XSL transformations are
an easy way to provide multiple presentation formats from
a single XML data source.
Lessons
- Introduction to Transforming XML Documents
- Using the XslTransform Class
- Extending XSLT Style Sheets
- Lab 7.1: Transforming Xml Documents
- Exercise 1: Applying a Style Sheet
- Exercise 2: Using Style Sheet Parameters
- Exercise 3: Extending a Style Sheet with an Extension
Object
After completing this module, students will be able to:
- Describe the business use cases for using XSLT.
- Describe the transformation process.
- Use the XslTransform class to apply style sheets to XML
documents.
- Display XML by using the Asp: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
The.NET Framework provides a number of classes in the System.Xml.Serialization
namespace that allow you to serialize objects as XML and to
deserialize XML into objects. In this module, you will learn
about XML serialization, why it is useful, and how serialization
is performed by using the XmlSerializer class.
Lessons
- Introduction to XML Serialization
- Serializing Objects Using XmlSerializer
- Controlling Serialization
- Lab 8.1: Serializing Objects as XML
- Exercise 1: Serializing a Purchase Order
- Exercise 2: Controlling Serialization with Attributes
- Exercise 3: Deserializing an Invoice
After completing this module, students will be able to:
- Define XML serialization.
- Serialize and deserialize objects by using the XmlSerializer
class.
- Control XML serialization by using attributes.
Inclusive to the overall costs of this Microsoft training
course is equipment, training material, lunch and refreshments.
|