XML Definitions
As with any technology, XML has its own acronym-riddled lingo. Some of the important acronyms to know include:
-
DTD - In XML, the definition of a valid markup is handled by a Document
Type Definition (DTD), which communicates the structure of the markup language.
The DTD specifies the validity of each tag.
-
XSL - The Extensible Style Language (XSL) is the style language for
XML.
-
XML Pointer Language (XPointer) and XML Linking Language (XLink) -
these two technologies define a standard way to represent links between resources.
In addition to simple links, like HTML's <A> tag, XML has mechanisms for
links between multiple resources and links between read-only resources. XPointer
describes how to address a resource; XLink describes how to associate two or
more resources.
- XML Flow Architecture - XML offers a three-tier architecture. It can be generated from existing databases using 3-tier model. We can maintain business rules separately
Why XML Should Be Used
XML contains a bevy of benefits. Some of the most profound benefits include:
- Authors and providers can design their document using XML, instead of being
stuck with HTML. They can be explicitly tailored for an audience, so the cumbersome
problems with HTML can evaporate: therefore, authors and designers will be free
to invent their own markup elements.
- Information can be richer and easier to use, because the hypertext linking
abilities of XML are much greater and simpler than those of HTML.
- XML can provide more (and better) facilities for browser presentation and
performance.
- XML certainly compresses exceedingly well. Since data compression algorithms
operate on the concept of maximizing the entropy of a given input stream, it
stands to reason that a highly ordered input stream consisting of regular, repeating
tag sequences will compress exceedingly well- much better than standard text
which contains generally far less order thus increase in performance.
Weakness of XML
XML is, obviously, not a cure-all, free of disadvantages... else we would be using XML and nothing else! There are some drawbacks and weaknesses of XML:
- XML markup can be incredibly verbose, depending on the vocabulary in question.
- XML is platform-neutral
- All the pieces aren't yet in place to do whatever you want with XML - certainly
not in a fully standards-compliant form, anyhow. We've got XSL/XSLT but they
are not fully developed yet.
- There are still some problems with Microsoft XML Parser July release.
- XML Hypertext Transfer Protocol (XML-HTTP) problems still exist.
Performance of XML
When you are designing your XML-based Web application and you need to know what kind of performance to expect from your XML server. It is hard to generalize, because there are so many variables -- such as the size of the XML documents, the amount of script code required to process the documents, the amount of output generated, etc. For example, major variables that can affect the performance of MSXML include:
- The Kind of XML Data
- The ratio of tags to text
- The ratio of attributes to elements
- The amount of discarded white space
XML and DOM
Microsoft has provided us DOM (Data Object Model for XML). With the XML Document Object Model (DOM), you can load and parse XML files, gather information about those files, and navigate and manipulate those files. To know about the details of XML DOM, please refer to Microsoft's XML DOM site.
We are going to create an XML file using static data and Data from Database using ADO. The DOM methods createNode and appendChild, and the text property are used to construct an XML tree. Now that we've discussed the reasons for using XML, it's time to look at some source code! Now we will examine some ASP scripts that create and display XML data! Above, we looked at the advantages and disadvantages of XML. Now we'll roll up our sleeves and get down to creating (and displaying) some XML documents using ASP code!
Comments