Pro .NET 2.0 XML

Bipin Joshi

Pro .NET 2.0 XML is the first book to provide a complete solution to XML on the .NET Framework 2.0 including the new .NET 3.0 extensions that are being released in January 2007.

  • Published on Jun 11 2007
  • Pages 499
  • Downloaded 9
  • Type PDF
    • Like
    • Love It
    • Awesome
    • Interesting
    • It's Okay
    • Thumbs Down
  • 7.4k
  • 0



XML is the de facto language for communication within and between distributed applications, whether they’re on the Internet or a corporate network. XML is successful because of two strengths: it has a highly-structured human readable format and it can be transmitted as pure text. No matter how disparate applications and their architectures may be, text files can always be read, and therefore can accept XML data. This makes XML-based solutions advantageous over rival technologies like remoting.

Pro .NET 2.0 XML is the first book to provide a complete solution to XML on the .NET Framework 2.0 including the new .NET 3.0 extensions that are being released in January 2007. It provides you with everything you need to know to take advantage of XML in every aspect of your job—including integration with Windows Communication Foundation.

  • This is the first book that describes how XML interacts with Windows Communication Foundation (part of the new .NET 3.0 extensions).
  • Author Bipin Joshi is a Microsoft Certified Trainer who regularly teaches classes on XML. He provides the kind of clear, precise guidance that you need.
  • This will be the most complete book on .NET 2.0 XML available. It covers everything you need to use XML effectively.

Author Information

Bipin Joshi has been programming since 1995 and worked on a variety of tools and technologies including C, C++, Clipper, FoxPro, VB, COM, and ASP before embracing the .NET platform in 2000. He is the web master of two popular web sites, and And he is the coauthor of several well received .NET 1.1 and .NET 2.0 titles. Bipin is also a Microsoft MVP and has MCT and MCAD certification.

What is in this book



About the Author

About the Technical Reviewer




CHAPTER 1 - Introducing XML and the NET Framework


What Is XML?

Benefits of XML

XML Is an Industry Standard

XML Is Self-Describing

XML Is Extensible

XML Can Be Processed Easily

XML Can Be Used to Easily Exchange Data

XML Can Be Used to Easily Share Data

XML Can Be Used to Create Specialized Vocabularies

XML-Driven Applications

Rules of XML Grammar

XML Markup Is Case Sensitive

The XML Document Must Have One and Only One Root Element

The Start Tag Must Have an End Tag

The Start and End Tags Must Be Properly Nested

The Attribute Values Must Be Enclosed in Quotes

DTDs and XML Schemas

Parsing XML Documents



The NET Framework


Assemblies and Namespaces

The XML Parsing Model in the NET Framework

NET Configuration Files


ASPNET Server Controls

XML Serialization


Web Services

XML Documentation

SQL Server XML Features

Working with Visual Studio

Creating Windows Applications

Creating Class Libraries



CHAPTER 2 - Manipulating XML Documents by Using the Document Object Model


Using the DOM Parser

Knowing When to Use DOM

A Sample XML Document

Opening an Existing XML Document for Parsing

Navigating Through an XML Document

Looking for Specific Elements and Nodes

Retrieving Specific Elements by Using the GetElementByTagName() Method

Retrieving Specific Elements by Using the GetElementById() Method

Selecting Specific Nodes by Using the SelectNodes() Method

Selecting a Single Specific Node by Using the SelectSingleNode() Method

Modifying XML Documents

Navigating Between Various Nodes

Modifying Existing Content

Deleting Existing Content

Adding New Content

Using Helper Methods

Dealing with White Space

Dealing with Namespaces

Understanding Events of the XmlDocument Class



CHAPTER 3 - Reading and Writing XML Documents


What Are XML Readers and Writers?

When to Use Readers and Writers

Reader Classes

The XmlTextReader Class

The XmlValidatingReader Class

The XmlNodeReader Class

Reading Documents by Using XmlTextReader

Opening XML Documents

Reading Attributes, Elements, and Values

Improving Performance by Using Name Tables

Dealing with Namespaces

Moving Between Elements

The ReadSubTree() Method

The ReadToDescendant() Method

The ReadToFollowing() Method

The ReadToNextSibling() Method

The Skip() Method

Moving Between Attributes

Reading Content

The ReadInnerXml() Method

The ReadOuterXml() Method

The ReadString() Method

Writing XML Documents

Exporting Columns As Elements

Exporting Columns As Attributes

Specifying Character Encoding

Formatting the Output

Including Namespace Support

Dealing with Nontextual Data

Serializing Data

Unserializing Data



CHAPTER 4 - Accessing XML Documents by Using the XPath Data Model


Overview of XPath

Location Path


Node Tests


Putting It All Together

XPath Functions

The XPath Data Model

Creating XPathNavigator

Navigating an XML Document by Using XPathNavigator

Selecting Nodes

Navigating Between Attributes

Retrieving Inner and Outer XML

Getting an XmlReader from XPathNavigator

Getting an XmlWriter from XPathNavigator

Editing XML Documents with the XPathNavigator Class



CHAPTER 5 - Validating XML Documents


Providing Structure for XML Documents

Document Type Definitions (DTDs)

XML Data Reduced Schemas (XDR Schemas)

XML Schema Definition Language Schemas (XSD Schemas)

Creating Structure for an XML Document

The Structure of Employeesxml

Creating the DTD

Creating the XSD Schema

Creating Schemas by Using the Schema Object Model (SOM)

The Core SOM Classes

Creating an XSD Schema by Using the SOM

Validating XML Documents Against DTDs and XSD Schemas

Inline DTD

External DTD

Inline Schema

External Schema

Using the XmlReader Class to Validate XML Documents

Using XmlDocument to Validate XML Documents Being Loaded

Using XPath Navigator to Validate XML Documents



CHAPTER 6 - Transforming XML with XSLT


Overview of XSLT

Applying Templates by Using <xsl:apply-templates>

Branching by Using <xsl:if>

Branching by Using <xsl:choose> and <xsl:when>

Transforming Elements and Attributes

The XslCompiledTransform Class

Performing Transformations by Using XslCompiledTransform

Passing Arguments to a Transformation

Using Script Blocks in an XSLT Style Sheet

Using Extension Objects





Overview of ADONET Architecture

Connected Data Access

Disconnected Data Access

ADONET Data Providers

Basic ADONET Classes

XML and Connected Data Access

Using the ExecuteXmlReader() Method

XML and Disconnected Data Access

Understanding DataSet

Understanding DataAdapter

Working with DataSet and DataAdapter

Saving DataSet Contents As XML

Reading XML Data into DataSet

Generating Menus Dynamically Based On an XML File

Reading Only the Schema Information

Creating a Typed DataSet

Using Visual Studio to Create a Typed DataSet

Using the xsdexe Tool to Create a Typed DataSet

The XmlDataDocument Class

Using the XmlDataDocument Class

Converting Between DataRow and XmlElement



CHAPTER 8 - XML Serialization


Understanding the Flavors of Serialization

Classes Involved in the Serialization Process

Serializing and Deserializing Objects by Using XML Format

Handling Events Raised During Deserialization

Serializing and Deserializing Complex Types

Serialization and Inheritance

Customizing the Serialized XML

Serializing Data in SOAP Format

Customizing SOAP Serialization



CHAPTER 9 - XML Web Services


What Are Web Services?

Creating and Consuming Web Services

Creating a Web Service

Creating a Proxy for a Web Service

Creating a Form That Consumes a Web Method

Calling a Web Method Asynchronously

Understanding SOAP

Using SOAP Headers

Understanding the WSDL Document

The Messages

The Type Definitions

The Port Types

The Binding

The Service

A Summary of WSDL



CHAPTER 10 - XML in SQL Server 2005


Using XML Extensions to the SELECT Statement

The FOR XML Clause


Using SQLXML Features

The SQLXML Managed Classes

The XML Data Type

Creating a Table with an XML Column

Inserting, Modifying, and Deleting XML Data

Methods of the XML Data Type

XML Data Modification Language (XML DML)

XQuery Support in the XML Data Type

Native Web Services

Creating a Stored Procedure

Creating an HTTP Endpoint

Creating a Proxy for the Endpoint

Consuming the Native Web Service



CHAPTER 11 - Use of XML in the NET Framework


Understanding Remoting

Remoting Architecture

Object Activation

Channels and Formatters

Flavors of Marshalling

Remoting Assemblies and Namespaces

Creating a Remoting-Enabled Application


Web Form Code Models


The XML Data Source Control

Working with Site Maps

Using a SiteMapPath Control

Using a SiteMapDataSource Control

Using the XML Control

Using the NET Framework Configuration System

Structure of the webconfig File

Inheritance and webconfig

Common Configuration Tasks

The ASPNET Provider Model

Displaying Custom Error Pages

Documenting XML Code

Creating a Class Library

Generating Documentation



CHAPTER 12 - Creating Services by Using Windows Communication Foundation


Understanding WCF Vocabulary

Creating and Consuming a WCF Service

Creating the Service

Hosting the Service

Consuming the Service

Testing the Host and Client

Hosting a WCF Service in IIS

Understanding the Role of XML in WCF Services

Using the XmlFormatter and XmlSerializer Classes

Using XmlSerializer Instead of XmlFormatter



APPENDIX A - Creating Custom XmlReader and XmlWriter Classes


Creating a Custom Implementation of XmlReader

Inheriting from XmlReader

Creating a TableReader Class

Using the TableReader Class

Creating a Custom XmlWriter

Inheriting from XmlWriter

Consuming the RssWriter Class



APPENDIX B - Case Study: A Web Service–Driven Shopping Cart


Creating the Database

Creating the Web Service

Creating the SqlHelper Class

Specifying the Connection String in webconfig

Creating the Web Methods

Creating the Shopping Cart

Adding the Web Reference

Displaying the Product Catalog

Creating the Shopping Cart Page

Testing the Website


APPENDIX C - Resources




Mindcracker Network accepts no liability for providing the customer with the hard copy of the book purchased. Mindcracker is not responsible for any dispute relating to the above. All eBooks listed in this section are in "PDF" Format. Contact [email protected] for further assistant.