Skip to main content

Building XML Applications

There are many ways to use XML within applications. The following sections go into much more detail across a variety of areas.

  • Processing XML with MSXML
  • XML and the Database
  • XML in the .NET Framework
  • XML Query
  • XML Schemas
  • XML Stylesheets

 

Processing XML with MSXML

Choosing the Right Version of MSXML


A Beginner's Guide to the XML DOM

This article discusses how to access and manipulate XML documents via the XML DOM implementation, as exposed by the Microsoft XML Parser.   

The Joy of SAX: A Visual Basic Sample

This article outlines an approach to programming the SAX2 interfaces from Microsoft Visual Basic.

XML and the Database

XML Indexes in SQL Server

Use the relational query engine in SQL Server 2005 (and later) to make a single query plan for the SQL and XQuery parts of your queries, and make the implementation of XML queries fast and easy to predict and tune.

Introduction to XQuery in SQL Server

This white paper provides an introduction to various features of XQuery implemented in SQL Server (2005 and later) such as the FLWOR statement, operators in XQuery, if-then-else construct, XML constructors, built-in XQuery functions, type casting operators, and examples of how to use each of these features. Non-supported features of XQuery in SQL Server and workarounds are described in this article. It also presents three scenarios where XQuery is useful.   

Optimize the XML Data Type in SQL Server

Discover ways to improve query and data modification performance of the XML data type in the Microsoft SQL Server 2005 and later.   

XML Options in SQL Server

Three options for handling XML data in the Visual Studio/SQL Server environment (2005 and later) are discussed, including usage scenarios and guidelines to help you choose between them.   

A Survey of Microsoft SQL Server XML Features

This article provides a roadmap of SQL Server XML features (2000 and later)

Creating a Web Service with SQLXML 3.0

Convert your stored procedures to Web services in SQLXML with instruction from this SQL Server Magazine article by Rich Rollman.

Exchanging XML with SQL Server and Reporting Services through the Web and Web Services

Venkat Prasad discusses programming techniques for saving XML data from SQL servers, Web servers, XML Web services, and SQL reporting servers (SQL Server 2000 and later).

Optimizing SQLXML Performance

How to optimize SQLXML performance for databases in SQL Server 2000 and later.

SQLXML Managed Classes

How to use SQLXML Managed Classes for .NET code to retrieve XML from a Microsoft SQL Server database or to generate XML on the client side, using ad hoc queries, stored procedures, annotated schemas with XPath, or XML templates.   

XML Best Practices for Microsoft SQL Server

Learn about the guidelines for XML data modeling and usage in SQL Server 2005 and later, and see illustrative examples.   

See How Microsoft SQL Server Supports XML

Explore the XML support built into SQL Server 2005 and later. Learn how this support integrates with the programming support in the .NET Framework V2.0, OLEDB, and SQLXML.

XML to SQL: Using SQLXML Bulkload in the .NET Framework

Amar Nalla showcases the Bulkload functionality available in SQLXML, which can be used to transform XML input into SQL data.   

XML in the .NET Framework

Building Custom XmlResolvers in the .NET Framework

Get under the hood of the XmlResolver class in System.Xml and review how to create your own implementations of XmlResolvers that allow you to retrieve XML documents from alternative data sources.   

XPath Querying Over DataSets with the DataSetNavigator

Leverage DataSetNavigator to get the flexibility of the XML programming model without converting the entire DataSet into an XmlDataDocument object.

Building an XPath Visualizer with Windows Forms

Praj Joshi produces a GUI tool for viewing the results of XPath queries on an XML document.

Generating XML Documents from XML Schemas

Use the classes in the System.XML.Schema namespace of the Microsoft .NET Framework to build a tool that generates sample XML documents conforming to a given schema.   

The XML Diff and Patch GUI Tool

Learn how to use the XmlDiff class in combination with Winforms to build an application that compares two XML files and shows these differences as an HTML document.  

An Introduction to the XML Tools in Visual Studio

Learn about the XML Editor and the XSLT Debugger in Visual Studio 2005 and later.

Troubleshooting Common Problems with the XmlSerializer

Christoph Schittko discusses various techniques for diagnosing common problems that occur when converting XML to objects and vice versa with XML Serialization technology in the .NET Framework.

Combine XML Documents with Xinclude

Learn about XInclude, an emerging W3C standard, and XPointer. Discover a specific implementation of XInclude for the .NET Framework.  

Code Generation in the .NET Framework Using XML Schema

Learn the difference between typed datasets and classes generated by the xsd.exe tool. Extend this process by reusing the infrastructure classes supporting it, staying compatible with the XmlSerializer.   

XmlCsvReader Implementation

XmlCsvReader is a sample implementation of an XmlReader that parses tab-delimited .csv files and presents their contents as a stream of XML elements; XmlReader is the Microsoft .NET Framework base class for all managed stream-level XML processing.

Using the XSD Inference Utility

Discusses the Microsoft XSD Inference utility, which simplifies the task of writing XML Schema by automatically generating schemas from instance documents. The inferred schema can then be refined with related document instances so that it can be used to describe and validate a whole class of XML documents.

Learn how the .NET Framework's classes and associated tools for manipulating XML data can be woven together to form an impressive array of options for constructing XML processing solutions.

Using the XML Diff and Patch Tool in Your Applications

Explains how to use the XML Diff and Patch tool, which compares two XML files and produces an XML output of the differences, by utilizing a typical scenario that readers can apply to their own applications.

XML Query

This section has information about XML query languages such as XPath and XQuery as well as best practices for using these technologies on Microsoft platforms.

The XML Files: Addressing Infosets with XPath


The XML Files: Object Graphs, XPath, String Comparisons, and More

This column looks at a standard approach for serializing object graphs as XML without duplicating data, writing XPath expressions, and more.

Extreme XML: Things to Know and Avoid When Querying XML Documents with Xpath

Learn the ins and outs of Xpath as Dare Obasanjo builds an XML catalog for his many XML books and takes you along for the ride.

XML Schemas

This section provides information about structuring and adding datatyping to XML documents on Microsoft platforms, using XML schema languages such as the W3C XML Schema language.

Improving XML Document Validation with Schematron

Dare Obasanjo describes how to use the Schematron XML validation language to enforce constraints on XML documents beyond the capabilities of the W3C XML Schema.   

XML Schema Design Patterns: Is Complex Type Derivation Unnecessary?

Learn about derivation by restriction and derivation by extension of complex types—the pros and cons of both techniques—and discover alternatives to achieving the same results.

W3C XML Schema Design Patterns: Avoiding Complexity

This article provides a set of solid guidelines about what you should do and what you shouldn't do when working with W3C XML Schema.   

W3C XML Schema Design Patterns: Dealing With Change

Techniques for building schemas that are flexible and allow evolution of both the underlying data and the schema in a modular manner.   

The XML Files: A Quick Guide to XML Schema - Part 1

This column is the first in a two-part series that cover the basics of XML Schema. It covers the basics of XML Schema, including how you define elements, attributes, complex types, and how to use the built-in data types.   

The XML Files: A Quick Guide to XML Schema - Part 2

This column is the second in a two-part series that cover the basics of XML Schema. It covers the more powerful features of the language, which are related to defining custom types and type hierarchies.   

XML Stylesheets

Find information about transforming XML documents on Microsoft platforms, using technologies such as XSLT.

Build Practical Solutions with EXSLT

Oleg Tkachenko shows how to make XML programming easier, and explains how to boost your productivity using XSLT and XPath extensions provided by the EXSLT.NET library.  

XSL Transformations: XSLT Alleviates XML Schema Incompatibility Headaches

The XSL Transformations (XSLT) specification defines an XML-based language for expressing transformation rules that map one XML document to another. XSLT has many of the constructs found in traditional programming languages, including variables, functions, iteration, and conditional statements. In this article you'll learn how to use the XSLT instructions and template rules, manage namespaces, control transformation output, use multiple stylesheets, and employ pattern-matching with template rules.   

The XML Files: Extending XSLT with JScript, C#, and Visual Basic .NET

XSLT is a powerful functional programming language that can make difficult tasks easy and easy tasks tough. In certain situations, a combination of XSLT's functional programming model and portions of custom code written in imperative languages like JScript, C#, or Visual Basic .NET can simplify the overall XSLT document. Microsoft's XSLT implementations, in both MSXML and .NET, provide excellent support for creating this type of hybrid XSLT application.   

The XML Files: IntelliSense for XSLT, Namespace Collisions, and More

This column looks at a number of XSLT questions, including ways to enable IntelliSense® for XSLT files in Visual Studio® .NET.   

The XML Files: XSLT Processing, Processing Instructions in XML, Parameterizing Statements in XML, and More

This column covers a number of issues, focusing on ways to process SQL Server results (2000 and later) using XSLT.   

Enhancing XSL

XSL provides a way of performing complex transformations on XML data. By using combinations of templates and scripting, you can significantly expand these transformations to perform precise validation and queries, incorporate subordinate documents, and generate highly sophisticated applications from any data.   

 

Top of pageTop of page

Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?