2.1 XML from 33,000 feet

2.1 XML from 33,000 feet

IT technicians, particularly those with a programming background, rarely, if ever, have a problem appreciating the need or rationale for XML. They can see the possibilities afforded by XML, even if it is just at a philosophical level. This is because they have typically experienced first hand the issues involved with trying to import data from one application into another ”even if it was that of trying to get comma-separated contact information from one type of electronic address book into a different address book used by another e-mail client.

Those who work for corporations that utilize multiple, disparate IT platforms have, in addition, invariably encountered the challenge of trying to make data used by an application suite on one platform be available, in a meaningful and thus useful manner, to another unrelated application suite running on another platform. Sometimes it does not even matter if the application suites are on the same platform. Any-to-any data interchange could never be taken for granted. For example, a corporation might have tried to take data that was being used by its in-house ERP application suite and make it available to a new CRM application. Realizing such a data exchange, which, though obvious and justifiable, may have been far from straightforward.

The Web accentuated the need for a generic but global mechanism for describing data so that it would not be misunderstood or misconstrued. Search engines (e.g., Google) looking through HTML-based Web pages would locate and index keywords, oblivious to their context. A chip would be a chip, irrespective of whether it was being used in the context of a micro-chip, a chocolate-chip cookie, Chip as in a first name , or even a wood chip. Not having a standard means to associate meaning and context to data made business-to-business (b2b) e-business propositions that much more taxing, since each and every data interchange permutation required between corporations and applications had to be dealt with on an individual basis.

Thus, it was no wonder that XML, from its inception, was hailed as the great unifying technology for the Web. It was meant to be the lingua franca for e-business. It was the next big thing (until Web services came along a few years later). It was, even independent of Web services, going to revolutionize the Web, applications, and b2b transactions. That is still in the cards ”albeit now with an increased dependence on Web services. XML, in cahoots with Web services, still dominates much of the thinking, planning, and positioning (not to mention posturing) when it comes to new corporate applications (including desktop applications), e-business, corporate portals, and the future makeup of the Web.

XML is powerful in that it has no inherent functional limitations. XML imposes no caveats or restrictions as to what types of data or the nature of the data that can be defined and described using its syntax. It is flexible and, per its name, extensible. It is also, nonetheless, disarmingly simple and straightforward. It eschews arcane codes and conventions. Furthermore, it is totally textual and is meant to be readily comprehensible to humans . With XML, data are always described in terms of an XML document. An XML document consists of the original data delimited and annotated by XML tags. XML, particularly in comparison to HTML, has strict and rigid rules but is painfully consistent.

XML, like Web services, has been slow to live up to its lofty expectations. As with Web services, there are, fortunately, some rational explanations as to why this has been the case. The innate simplicity and flexibility of XML do mean that XML can be verbose and cumbersome. Though data defined using XML are said to be self-describing , deciphering what the data mean does require intelligence. People typically have no problems understanding XML-defined data ”provided, of course, that they have, at a minimum, average common sense. However, computers and applications do not have any inherent smarts. Intelligence has to be supplied in the form of programming. XML cannot get around that.

For applications to understand XML data, they need guidance ”that is, a level of mutual intelligence shared by the creator and the consumer. In essence you need common, application-specific vocabularies (e.g., a vocabulary for CRM applications, another vocabulary for funds transfer applications, and so forth). It has taken a while for these vocabularies, particularly those needed for the pertinent e-business scenarios (e.g., supply-chain management), to be formulated. The good news, however, is that by the beginning of 2003 there was adequate progress and consensus on this front so as to preclude it from being an impediment for much longer.

By the beginning of 2003, most popular commercial software offerings supported XML in some form or another. The types of software supporting XML include commercial applications (e.g., Siebel s Siebel 7 Customer Relationship Management suite, SAP s Supply Chain Management, and IBM s WebSphere Business Integrator); database management systems (e.g., Oracle 9i and IBM s DB2 Ver. 7); software development tools (e.g., IBM s WebSphere Studio Application Developer, IBM s latest COBOL compiler, and Microsoft s Visual Studio .NET 2003); corporate portal solutions (e.g., BEA WebLogic Portal); application servers (e.g., IBM s WebSphere Application Server V4); message queuing middleware (e.g., WebSphere MQ); and even desktop applications.

Microsoft s Excel 2002, in Office XP, has an XML Spreadsheet file format that allows users to import, export, and analyze XML data. Figure 2.3(a, b) illustrates Excel s XML support by showing a small, sample Excel spreadsheet and the initial part of the XML representation of that spreadsheet. (The full XML document for this simple and small spreadsheet is still too long to be included in total ”testifying to the previously mentioned verbosity of XML.) Microsoft also supports XML in its SQL Server 2000, Access 2002, and BizTalk Server 2000 offerings. Microsoft s Word 2003, which will be a part of the new Microsoft Office 2003, will enable documents to be saved in XML form, as well as the integration of XML-defined data within Word documents. The bottom line here is that the repertoire of widely used commercial applications supporting XML is now reaching critical mass, thus making XML more accessible and tangible than ever before. Plus, there is the growing impetus around Web services ”the killer application for XML.

click to expand
Figure 2.3(a): A small and simple Excel spreadsheet.
start figure
 <?xml version="1.0"?>  <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"   xmlns:o="urn:schemas-microsoft-com:office:office"   xmlns:x="urn:schemas-microsoft-com:office:excel"   xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"   xmlns:html="http://www.w3.org/TR/REC-html40">   <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">    <Author>Anu Guruge</Author>    <LastAuthor>Anu Guruge</LastAuthor>    <Created>2003-05-18T01:13:19Z</Created>    <LastSaved>2003-05-18T01:33:46Z</LastSaved>    <Version>10.4219</Version>   </DocumentProperties>   <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">    <DownloadComponents/>    <LocationOfComponents HRef="file:///\"/>   </OfficeDocumentSettings>   <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">    <WindowHeight>10230</WindowHeight>    <WindowWidth>16155</WindowWidth>    <WindowTopX>480</WindowTopX>    <WindowTopY>30</WindowTopY>    <ProtectStructure>False</ProtectStructure>    <ProtectWindows>False</ProtectWindows>   </ExcelWorkbook>   <Styles>    <Style ss:ID="Default" ss:Name="Normal">     <Alignment ss:Vertical="Bottom"/>     <Borders/>     <Font/>     <Interior/>     <NumberFormat/>     <Protection/>    </Style>    <Style ss:ID="s27">     <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>     <Font ss:Color="#FFFFFF"/>     <Interior ss:Color="#000000" ss:Pattern="Solid"/>    </Style>    <Style ss:ID="s31">     <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>    </Style>    <Style ss:ID="s34">     <Font ss:Color="#FFFFFF"/>     <Interior ss:Color="#000000" ss:Pattern="Solid"/>    </Style>    <Style ss:ID="s37">     <Font ss:Color="#FFFFFF"/>     <Interior/>    </Style>    <Style ss:ID="s38">     <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>    </Style>    <Style ss:ID="s39">     <Alignment ss:Vertical="Bottom" ss:WrapText="1"/>    </Style>    <Style ss:ID="s44">     <Alignment ss:Vertical="Bottom"/>     <Font/>     <NumberFormat ss:Format="Short Date"/>    </Style>    <Style ss:ID="s46">     <Borders>      <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>     </Borders>    </Style>   </Styles>   <Worksheet ss:Name="Sheet1">    <Table ss:ExpandedColumnCount="8" ss:ExpandedRowCount="34" x:FullColumns="1"     x:FullRows="1">     <Column ss:AutoFitWidth="0" ss:Width="106.5"/>     <Column ss:AutoFitWidth="0" ss:Width="46.5"/>     <Column ss:AutoFitWidth="0" ss:Width="43.5"/>     <Column ss:Hidden="1" ss:AutoFitWidth="0"/>     <Column ss:AutoFitWidth="0" ss:Width="39"/>     <Column ss:AutoFitWidth="0" ss:Width="106.5"/>     <Column ss:Index="8" ss:AutoFitWidth="0" ss:Width="49.5"/>     <Row ss:AutoFitHeight="0" ss:Height="27">      <Cell ss:MergeAcross="7" ss:StyleID="s27"><Data ss:Type="String">Anu's &amp;  Deanna's Wedding - January 1, 2003</Data></Cell>     </Row>     <Row ss:Index="3">      <Cell ss:Index="6" ss:StyleID="s31"><Data ss:Type="String">      Status as of = </  Data></Cell>      <Cell ss:MergeAcross="1" ss:StyleID="s44" ss:Formula="=DATE(2002,11,30)"><Data        ss:Type="DateTime">2002-11-30T00:00:00.000</Data></Cell>     </Row>     <Row ss:Index="5" ss:Height="25.5">      <Cell ss:StyleID="s39"><Data ss:Type="String">Maximum number of guests possible  =</Data></Cell>      <Cell><Data ss:Type="Number">100</Data></Cell>     </Row>     <Row ss:Index="7">      <Cell><Data ss:Type="String">Total invited todate = </Data></Cell>      <Cell ss:Formula="=R[23]C+R[23]C[5]"><Data ss:Type="Number">25</Data></Cell>     </Row>     <Row ss:Index="9">      <Cell><Data ss:Type="String">RSVP todate =</Data></Cell>      <Cell ss:Formula="=R[21]C[1]+R[21]C[6]"><Data ss:Type="Number">10</Data></Cell>      </Row>     <Row ss:Index="12">      <Cell ss:StyleID="s38"><Data ss:Type="String">Name</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="String"># invited</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="String"># RSVP</Data></Cell>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell ss:StyleID="s38"><Data ss:Type="String">Name</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="String"># invited</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="String"># RSVP</Data></Cell>     </Row>     <Row>      <Cell ss:StyleID="s34"><Data ss:Type="String">Deanna's Side</Data></Cell>      <Cell ss:StyleID="s37"/>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell ss:StyleID="s34"><Data ss:Type="String">Anu's Side</Data></Cell>     </Row>     <Row>      <Cell><Data ss:Type="String">Mum</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">1</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">1</Data></Cell>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell ss:StyleID="s31"><Data ss:Type="String">Dad &amp; wife</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"/>     </Row>     <Row>      <Cell><Data ss:Type="String">Jen &amp; Eric</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell><Data ss:Type="String">Gary &amp; Susanne</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>     </Row>     <Row>      <Cell><Data ss:Type="String">Lisa, Stephen &amp; kids</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">4</Data></Cell>      <Cell ss:StyleID="s38"/>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell><Data ss:Type="String">John Kimball</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">1</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">1</Data></Cell>     </Row>     <Row>      <Cell><Data ss:Type="String">Melody &amp; friend</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"/>      <Cell ss:Index="5" ss:StyleID="s46"/>      <Cell><Data ss:Type="String">Donny &amp; Marcia</Data></Cell>       <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>     </Row>     <Row>      <Cell><Data ss:Type="String">Mike &amp; Penny</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:StyleID="s38"><Data ss:Type="Number">2</Data></Cell>      <Cell ss:Index="5" ss:StyleID="s46"/> 
end figure

Figure 2.3(b): The initial part of the XML document created by Excel to describe the spreadsheet shown in Figure 2.3(a).

Web Services[c] Theory and Practice
Web Services[c] Theory and Practice
ISBN: 1555582826
Year: 2006
Pages: 113

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