XML

XML (Extensible Markup Language) is a W3C Recommendation for creating special-purpose markup languages. It is a simplified subset of SGML, capable of describing many different kinds of data. Its primary purpose is to facilitate the sharing of structured text and information across the Internet. Languages based on XML (for example, RDF, SMIL, MathML, XSIL and SVG) are themselves described in a formal way, allowing programs to modify and validate documents in these languages without prior knowledge of their form.

Table of contents
1 Strengths and Weaknesses
2 Syntax rules in XML
3 Document Type Definitions and XML Schemas
4 Displaying XML on the web
5 XML Extensions
6 Processing XML files
7 Versions of XML
8 See also
9 External links

Strengths and Weaknesses

The features of XML that make it particularly appropriate for data transfer are : XML is also heavily used for document storage and processing, both online and offline:
  • robust, logically-verifiable format based on international standards
  • hierarchical structure suitable for most (but not all) types of document
  • plaintext files, unencumbered by licenses or restrictions
  • platform-independent, so relatively immune to changes in technology
  • has already been in use (as SGML) for long over a decade, so there is extensive experience and software available.

The weaknesses of the format relates to matters of efficiency, since the XML
  • is not compressed
  • still requires further parsing to extract individual values.
  • modelling overlapping (non-hierarchical) data structures requires extra effort.

For matters of generic, loosely bound data transfer the strengths outweigh weaknesses, and in many neutral applications where efficiency is not a particular concern XML is also coming to be adopted simply because tools to manipulate XML are now conveniently on-hand.

Syntax rules in XML

An XML document is text, usually Unicode although other encodings may be used.

Unlike, for example, HTML, XML is highly dependent upon structure, content and integrity for its efficacy. In order for a document to be considered "well-formed" [1], it must conform (at the very least) to the following:

  • It must have one (and only one) root element.
  • Non-empty elements must be delimited by a start-tag and an end-tag. Empty elements may be marked with an empty-element tag.
  • All attribute values must be quoted.
  • Tags may be nested but may not overlap, that is each non-root element must be completely contained in another element.

Element names in XML are case-sensitive: for example and are a well-formed matching pair whereas and are not.

Also, again unlike HTML, clever choice of XML element names allows the meaning of the data to be retained as part of the markup. This makes it more easily interpreted by software programs.

As a concrete example, a simple recipe expressed in an XML representation might be:

       
           Basic bread
           Flour
           Yeast
           Warm Water
           Salt
           
             Mix all ingredients together, and knead thoroughly.
              Cover with a cloth, and leave for one hour in warm room.
              Knead again, place in a tin, and then bake in the oven.
           
       

Identifying information accurately enables programs to manipulate it easily: in this example, it is now easy to convert the quantities to other measuring systems, or to print the ingredients as icons for those with low reading skills (or different native language), or to refer to the individual ingredients or steps from elsewhere (another recipe, for example).

An XML document that meets certain other criteria in addition to being well-formed (such as complying with an associated DTD) is said to be "valid".

Document Type Definitions and XML Schemas

Before the advent of generalised data description languages such as SGML and XML, software designers had to define special file formats or small languages to share data between programs. This required writing detailed specifications and special-purpose parsers and writers. For a language based on XML, however, the software designer can specify the basic syntax by writing a DTD, or a more detailed description using an XML Schema. There are readily available (and in some cases free) tools which understand these descriptions -- XML parsers and writers. This may significantly reduce life-cycle development cost.

Displaying XML on the web

As a further adjunct to XML is the stylesheet language XSL, which allows users to describe visual properties and transformations of XML data without embedding those instructions into the data itself. The resulting document is then an HTML document which uses CSS for rendering.

An XML document may also be rendered directly in some browsers such as e.g. Internet Explorer 5 or Mozilla with the stylesheet language CSS. This process is still not yet stable as of January 2003. The XML document must include a reference to a style sheet:

While browser-based XML rendering develops, the alternative is conversion into HTML or PDF or other formats on the server. Programs like Cocoon process an XML file against a stylesheet (and can perform other processing as well) and send the output back to the user's browser without the user needing to be aware of what has been going on in the background.

XML Extensions

  • XPath It is possible to refer to individual components of an XML document using XPath. This allows stylesheets in (for example) XSL and XSLT to dynamically "cherry-pick" pieces of a document in any sequence needed in order to compose the required output.
  • XQuery is to XML what SQL is to relational databases.
  • XML namespaces enable the same document to contain XML elements and attributes taken from different vocabularies, without any naming collisions occurring.

Processing XML files

The APIs widely used in processing XML data by programming languages are SAX and DOM. SAX is used for serial processing whereas DOM is used for random-access processing.

An XSL processor may be used to render an XML file for displaying or printing. XSL itself is intended for creating PDF files. XSLT is for transforming to other formats, including HTML, other vocabularies of XML, and any other plain-text format.

The native file format of OpenOffice.org and AbiWord is XML. Some parts of Microsoft Office 11 will also be able to edit XML files with a user-supplied schema (but not a DTD). There are dozens of other XML editors available.

Versions of XML

The first and current version of XML is 1.0. There is a W3C Candidate Recommendation for XML 1.1, a set of changes to XML to address character set issues.

There are also discussions on an XML 2.0, although it remains to be seen if such will ever come about. XML-SW (SW for skunk works), written by one of the original developers of XML, contains some proposals for what an XML 2.0 might look like: elimination of DTDs from syntax, integration of Namespaces, XML Base and XML Information Set into the base standard.

See also

External links



In the News

Ringing In The Ear: More Than 80 Percent Of Patients Manage To Stop Di
It is estimated that between 10 and 17% of the population has suffered tinnitus at some time in their lives, according to a number of international studies. Tinnitus is understood as the perception of noise in the ears or inside the head although there is no external source of sound, without any vibratory cochlear activity taking place (which occurs when an external noise is produced). Sound therapy is a treatment option with promising results.

Macworld Video Highlights: MacBook Air, iPhone Upgrade and More
In this two-minute video, Wired brings you the highlights from the first day of Macworld 2008: Steve Jobs' keynote, the new MacBook Air, upgrades to the iPhone and AppleTV, and more. Plus: Veronica Belmont gets denied!

Proclamation by the President: National Day of Prayer and Remembrance
Official press release from President George W. Bush proclaiming September 16, 2005, as a National Day of Prayer and Remembrance for the Victims of Hurricane Katrina. It is meant to "honor the memory of those who lost their lives, to provide comfort and strength to the families of the victims, and to help ease the burden of the survivors."

Apocalypse, and How: Viggo Mortensen's 'Road' Winds On
After battling evil in The Lord of the Rings, the accomplished actor takes on a different kind of overarching menace in the screen adaptation of Cormac McCarthy's catastrophically compelling ode to humanity. Mortensen talks about the movie, its message and the power of apocalyptic cinema.


NASA Study Finds Earth's Auroras Are Not Mirror Images
Scientists looking at the Earth's northern and southern auroras were surprised to find they are not mirror images of each other, as was once thought. The main cause behind the differences appears to be the interaction between the Sun's outer atmosphere and the Earth's magnetic field.

Marburg Virus Identified In A Species Of Fruit Bat
The Marburg virus, like its fearsome cousin Ebola, belongs to the Filoviridae family. It carries the name of the German town where it was first detected in 1967, after a mysterious epidemic had hit employees of the Behring laboratory. The workers had been contaminated as they took organ samples from green monkeys imported from Uganda. Up to the end of the 20th Century, rare cases of violent haemorrhagic fever attack linked to Marburg virus were subsequently registered, essentially in East Africa. However, in 1998, a more extensive epidemic affected 149 people near Durba, a town in the North-East of the Democratic Republic of Congo. More than 80% of these people succumbed to the haemorrhagic fever the virus caused.

P2P Action
NMR has allowed German researchers to investigate the cooperative binding of DNA to an important protein involved in suppressing tumour growth in our bodies. The binding of p53 to DNA is regulated by protein-protein interactions through a double salt bridge, they have found. The finding suggests that this salt bridge might be crucial to protecting us from certain types of cancer and fixing it when it malfunctions could provide a new avenue for anticancer drug research.

New biosensors reveal workings of anti-psychotic drugs in the living b
Scientists have resolved a question about how a popular class of drugs used to treat schizophrenia works using biosensors that reveal previously hidden components of chemical communication in the brain.

New Aging Studies Improving Vaccine Efficacy For The Elderly
A new study demonstrates that immune system cells important for both pathogen resistance and vaccine efficacy live longer in older animals but because of this longevity acquire functional defects. The work may provide new targets for boosting immune system function in older individuals.

Rensselaer Researchers Develop Heat Spreader For Epileptic Seizure Tre
Rensselaer Polytechnic Institute researchers are developing a tiny, highly efficient heat spreader to be used in a new device to be implanted in the brain of patients who suffer from severe epileptic seizures. The implant device is designed to detect and arrest epileptic seizures as they begin by cooling a small region of the brain, thereby effectively blocking the erratic electrical activity.




MP3 Music Downloads

Preview songs, Download Free Music,Burn CDs at ITunes.com
iTunes_RGB_9mm

 


Google




InformationQuickFind.com - Find Information Fast

Links | Privacy Policy | News |