|
XML Advances on B2B Front
Enhancements in the alpha release of the next .NET Framework version promise big benefits for B2B apps.
by Dan Wahlin
Posted November 7, 2003
Technology Toolbox: C#, XML
Extensible Markup Language (XML) has evolved considerably in its short five-year history. It started out as a simple way to mark up data and relied on seasoned technologies for data validation, such as document type definitions (DTDs). As XML has matured, the World Wide Web Consortium (W3C) has added new technologies—such as XML Schema, Extensible Stylesheet Language Transformations (XSLT), and XPath—to support and enhance its usefulness. XML has grown from being primarily a data-exchange format to one you can also use to generate graphics, PDFs, and even word-processing documents.
Version 1.1 of the .NET Framework supports today's mainstream XML technologies, including DTDs, XML Schema, XSLT, XPath, Simple Object Access Protocol (SOAP) 1.1, Document Object Model (DOM) Level 2, and XML namespaces. Version 2 of the .NET Framework continues to support these technologies (and newer versions where appropriate). It also contains integrated support for SQLXML functionality, simplifies mapping of relational data to XML, and provides an execution and compilation environment for a new query language called XQuery. I'll introduce you to several new XML features in version 2 of the .NET Framework and explain how you can use new XML APIs to work with XML in the applications you'll write in the near future (download the sample code). The code you'll see is based on the alpha Framework release, so class name and namespace changes are certainly possible before the beta appears.
If you've ever developed a business-to-business (B2B) application that moves XML data into a relational database, converts relational data to XML, or exposes data through a Web service, you know how much work it can take to put the initial code infrastructure in place. The currently available approaches to this common problem—such as using XSLT to transform XML into a structure that mirrors database tables, using the XmlTextReader to parse the XML and generate SQL statements, or using SQL Server 2000 XML functionality—generally require a fair amount of development time, and they aren't the most flexible when changes occur in the XML or database schema.
XML APIs in version 2 of the .NET Framework remedy this situation by adding relational-to-XML data mapping. New XML adapters can use these mappings (called XML Views) to generate XML from relational databases and move XML data back into relational database tables. You use XML schemas to define XML Views, which replace custom procedural mappings you write typically using a .NET programming language. XML Views are declarative, so you can decouple applications from the database schema so that schema changes don't require recompilation.
Back to top
|