hot info

The Disadvantages of XML Data

on Senin, 15 Juni 2009

The Disadvantages of XML Data
Besides XML's advantages for data interchange, there are nonetheless some disadvantages. The first thing new users notice is that you cannot simply load arbitrary XML into an application or database the way that you can load a spreadsheet. That level of interoperability requires higher-level specifications, and those have been slow to gain acceptance. Without those specifications, XML processing still, unfortunately, requires a lot of custom coding and a not insignificant amount of processing time.

4.2.1. Interoperability
XML alone is not sufficient for sharing data: higher-level specifications are required to define what information should appear in the XML and how it should be structured. It is difficult to write a general-purpose, off-the-shelf tool to import XML into a database, but people can provide off-the-shelf tools to import NewsML [NEWSML], Extensible Business Reporting Language [XBRL], or many other such formats.

Higher-level XML data formats, however, are difficult and expensive to create, and there are too many of them. These problems might seem to contradict each other. In fact, people propose many higher-level XML formats but implement few of them, as discussed in Section 1.4.4: The proliferation of proposals causes confusion without providing solutions that people can build around.

Because there are rarely middle layers between low-level XML and high-level data formats, most XML data specifications are stovepipes, built from low-level XML on up. Although most of them share common concepts, such as identifiers, references, entities, attributes, and relationships, they all implement them differently, destroying the chance to use shared codeand shared user knowledgeto lower costs. As a result, there are few useful off-the-shelf components for dealing with data and no significant economies of scale or network effects.

XML networking specifications (see Chapter 5) are helping this problem somewhat by providing general-purpose data formats for the networking payloads. These data formats may not be optimal for exporting large amounts of information from databases or publishing data on the Web, but they will at least provide a starting point.

4.2.2. Abstraction
Abstraction can also be a problem. If one organization exports its data to XML, a second organization probably will be unable to read that data into its system immediately but will have to write transformation and import scripts to change the XML to a format that its system can use. That is the major problem with XML for data sharing: Its abstraction gives it many advantages, but it also means more work. You cannot simply save or load any arbitrary XML data the way that you can save or load a spreadsheet file.

4.2.3. Resources
XML has a reputation, partly deserved and partly undeserved, as a resource hog. XML is plaintext, and XML data is usually in an abstract, logical format, so reading XML into an application often requires two steps: parsing the XML from plaintext and transforming the parsed XML so that the application, such as a database, can use it.

Parsing and transformation take time, as does generating XML for output. Chapter 8 discusses how to avoid some of the worst inefficiencies in XML processing, but in an extremely high-speed environment, the time and processor use of XML might still be unacceptable.

0 komentar:

Posting Komentar