Institute for Advanced Professional Studies

XML Programming Using C# and .NET




XML Programming Course Overview:

This advanced, four-day, hands-on workshop enables participants to effectively use .NET Framework XML classes and the C# programming language with .NET's XML processing APIs. Parsing using XmlReader and the Document Object Model (DOM), writing XML streams using XmlWriter, and transformations using XPath and XSLT are emphasized.

The course also covers XML serialization according to XML Schema and the tight coupling between XML and ADO.NET. It includes a practical discussion of performance tradeoffs for various XML technology alternatives. Every sample program and exercise adheres to W3C and .NET standards for highly portable code.

The course is intended for experienced software developers with a working knowledge of XML, and familiarity with DTDs or XML Schema, who want to build XML applications or components using Microsoft's .NET and the C# programming language.

Upon completion of this course, participants will be able to create XML applications in .NET effectively, and select the best XML and .NET technologies to meet the application program's requirements.

Numerous programming examples and exercises are provided, including a fully-developed case study. Participants will receive a comprehensive set of materials, including detailed course notes and soft copy of all the programming examples and lab exercises.

Related courses:


XML Workshop Objectives:

Upon successful completion of this course, participants will be able to:

  • Describe the purpose of the .NET Framework XML classes
  • Parse XML data streams using XMLReader classes
  • Validate XML data streams that are described by a DTD or an XML Schema
  • Use the XMLTextWriter class to create XML data streams
  • Modify, create and delete information in an XML document using the Document Object Model (DOM) .NET classes
  • Use XML Schema to express precise type information for an XML document and the .NET Schema Object Model classes to read and write schema information
  • Use XML Serialization to persist XML data
  • Acquire a working knowledge of the tight coupling of XML with ADO.NET
  • Use XPath to query for content in an XML document and the .NET XPathNavigator class to parse XML documents
  • Use XSLT to transform XML documents into text, HTML or other XML
  • Evaluate performance tradeoffs in alternative XML technologies

IAPS can customize XML, C# and .NET training to address specific project requirements and achieve organizational objectives.


Topic Outline:

  • .NET Framework XML Overview
    • How XML is Used in the .NET Framework
    • .NET XML Namespaces
    • How the MSXML Fits in .NET
    • What the W3C Says
    • What the W3C Does Not Say
    • .NET XmlReader and XmlWriter Features
    • .NET DOM Parser
    • XML Serialization
    • XML and ADO.NET
    • XPath and XSLT
    • XML and the Web

  • Reading XML Streams in .NET
    • XML Document Streams
    • The XmlTextReader Class
    • Accessing Node Properties with the .NET XML Classes
    • Accessing Attribute Values
    • Traversing the XML Document
    • Catching XMLExceptions
    • The XmlNodeReader Class

  • Validating XML Streams
    • Specifying Valid Documents with DTD
    • Validating XML with XmlValidatingReader
    • Specifying Valid Documents with XML Schema

  • Writing XML Streams in .NET
    • The XmlWriter Class
    • The XmlTextWriter WriteXXX Methods
    • XmlTextWriter States
    • Writing Elements
    • Writing Attributes
    • Writing Namespaces

  • The Document Object Model in .NET
    • Origins of the DOM
    • DOM Levels
    • DOM2 Structure
    • The XmlDocument Class
    • DOM Tree Model
    • DOM Interfaces
    • XmlDocument, XmlNode and XmlNodeList Classes
    • XmlElement and XmlText Classes
    • Finding Elements by Name
    • Walking the Child List
    • The XmlAttribute Class
    • Namespaces and the DOM
    • Error Handling

  • Manipulating XML Information with the DOM
    • Modifying Documents
    • Modifying Elements
    • Modifying Attributes
    • Managing Children
    • Cloning
    • Splitting Text and Normalizing
    • Creating New Documents
    • Object Persistence with the DOM
    • Adapting Object Models to the DOM

  • Using XML Schema
    • What is an XML Schema?
    • Schema vs. DTDs
    • Structure of a Schema
    • Schema vs. Instance Document
    • Associating Schemas with Documents
    • Testing, Validating and Displaying Schemas and Documents

  • XML Serialization
    • XmlSerializer
    • What is Not Serialized
    • Writing and Reading XML
    • Customizing XML Serialization
    • XML Schema and XSD
    • Creating Classes from Schemas
    • XML Serialization and Web Services

  • XML and ADO.NET
    • Strong Coupling Between ADO.NET and XML
    • Rendering XML from a DataSet
    • Controlling XML Output
    • Reading XML into a DataSet
    • XML Schema and DataSets
    • Typed DataSets
    • Synchronizing DataSets and XML

  • XPath
    • Addressing XML Content
    • XPath in XSLT
    • Tree Structure
    • XPath Expressions
    • Type Model
    • Context
    • Axis, Node Test, and Predicate
    • Abbreviations
    • Proximity Position
    • XPath Functions
    • Comparisons Between Various Types
    • XPathNavigator

  • XSLT
    • XSL and XSLT
    • Rule-Based Transformations
    • Templates
    • Producing Text, HTML, and XML
    • XslTransform

  • XML Performance Tradeoffs
    • DOM vs. XmlReader/XmlWriter
    • Validating vs. Non-Validating Parser
    • XPathDocument vs. XmlDocument in XSLT
    • Benchmarking XML Performance

  • Appendix A: Comprehensive Case Study
  • Appendix B: Quick Reference -- XML and DTD Grammar
  • Appendix C: Developing Web Services Using Visual Studio
  • Appendix D: Learning Resources

Duration:

4 days


Intended Audience:

The course is intended for experienced software developers who wish to become competent at building XML applications or components using Microsoft's .NET and the C# programming language.


Technical Prerequisites:

Participants should have with a working knowledge of XML, and familiarity with DTDs or XML Schema, and a working knowledge of related program development tools.


Course Format:

Hands-on lecture/workshop




© Copyright 2004-2015 Institute for Advanced Professional Studies (IAPS)