Section 3.1. Speak XML


3.1. Speak XML

Simply put, XML is a way to store data as plain text. This useful because it allows all sorts of hardware and software to exchange data and, more importantly, understand that data. If Office 2003's goal is integration, then XML is the means to accomplish that goal.

Excel 2003 supports XML at two levels:

  • The XML spreadsheet file format lets you save and open Excel workbooks stored as plain text in XML format.

  • Lists and XML Maps let you import and export XML to a range of cells in a worksheet.


Note: Code used in this chapter and additional samples are available in ch03.xls.

3.1.1. How it works

The concept behind XML has been around for a very long time. The core idea is that if you store content in plain text, add descriptive tags to that content, then describe those tags somewhere, you enable that content to be shared across applications, networks, and hardware devices in some very interesting ways.


Note: XML is a large and complex topic. You don't have to be an expert to use XML effectively in Excel, but you do need a basic understanding of the concepts and components.

XML is the standard for tagging content and navigating among those tags. XML has related standards for describing tags and transforming documents. All of these standards are maintained by W3C and are published at www.w3.org. There are quite a few acronyms associated with XML, and the following tables will help you understand them.

Acronym

Full name

Use to

XML

Extensible Markup Language

Describe data as plain text documents.

XPath

XML Path Language

Define parts of an XML document and navigate between those parts.

DTD

Document Type Definition

Define the tags used to identify content in an XML document.

XSD

XML Schema Definition

An XML-based version of DTD. XSD is the successor to DTD.

XSL/XSLT

XML Style Sheet Language (Transformation)

Transform XML documents into other documents, such as HTML output.


In addition to the language standards cited above, there are a number of different ways to access XML data from code and to transmit XML across networks. The following table describes these key terms.

Acronym

Full Name

Description

DOM

Document Object Model

API for manipulating XML documents.

SAX

Simple XML API

Another API for manipulating XML documents.

SOAP

Simple Object Access Protocol

Defines the structure of XML data transmitted over a network and how to interpret that structure as it is received.

WSDL

Web Service Description Language

Describes services that can be invoked across a network through SOAP.


The last two items in the preceding table concern web services, which are a way to execute programs over the Internet and to receive responses from those programs.

I don't have space here to provide tutorials on how to use the items listed above, but fortunately there are some very good books and online information available about each.

3.1.2. What about...

To learn how to

Look here

Use XML/XSD/XSLT (tutorials)

www.w3schools.com




    Excel 2003 Programming. A Developer's Notebook
    Excel 2003 Programming: A Developers Notebook (Developers Notebook)
    ISBN: 0596007671
    EAN: 2147483647
    Year: 2004
    Pages: 133
    Authors: Jeff Webb

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net