XML was designed to be self-descriptive, (#33643)
This commit is contained in:
committed by
Randell Dawson
parent
a355c80e45
commit
463df1b2ce
@ -3,9 +3,8 @@ title: Extensible Markup Language (XML)
|
||||
---
|
||||
## Extensible Markup Language (XML)
|
||||
|
||||
XML stands for eXtensible Markup Language. It is extensible, because it does not use a predefined set of tags for identifying structural components; instead, it provides a mechanism for defining such sets of tags. In XML, tags specify meaning rather than presentation, and the main purpose of the language is to share data: XML is a format that is both human- and machine-readable.
|
||||
XML became a W3C Recommendation as early as February, 1998.
|
||||
|
||||
XML stands for eXtensible Markup Language. It is extensible, because it does not use a predefined set of tags for identifying structural components; instead, it provides a mechanism for defining such sets of tags. In XML, tags specify meaning rather than presentation, and the main purpose of the language is to share data: XML is a format that is both human- and machine-readable. XML was designed to be self-descriptive. XML became a W3C Recommendation as early as February, 1998.
|
||||
|
||||
## Syntax of XML
|
||||
XML syntax refers to the rules that determine how an XML application can be written. The XML syntax is very straight forward, and this makes XML very easy to learn.
|
||||
|
||||
@ -18,9 +17,9 @@ title: Extensible Markup Language (XML)
|
||||
</child>
|
||||
</root>
|
||||
```
|
||||
#### XML must have a root element
|
||||
#### XML must have a root element
|
||||
|
||||
XML documents must contain one root element that is the parent of all other elements:
|
||||
XML documents must contain one root element that is the parent of all other elements:
|
||||
|
||||
```
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@ -33,7 +32,7 @@ XML documents must contain one root element that is the parent of all other elem
|
||||
```
|
||||
|
||||
In the above example 'note' is the root element.
|
||||
|
||||
|
||||
## Advantages of using XML:
|
||||
* Simplicity - XML documents are ordinary text files that can be created and edited with any text editor.
|
||||
* Vendor independence - XML can be read and written with non-proprietary systems
|
||||
@ -58,11 +57,11 @@ As you can see, XML is quite similar to HTML, but the difference lies in the fun
|
||||
|
||||
There is a main thing between XML and HTML which makes them different from each other. It is that XML was designed to carry a particular information and focuses on that informaion only. And HTML focuses on displaying that particular Information like design and all these stuff regarding the information.
|
||||
|
||||
There are two primary differences between XML and HTML:
|
||||
1. XML was designed to describe data; whereas, HTML was designed to display data.
|
||||
There are two primary differences between XML and HTML:
|
||||
1. XML was designed to describe data; whereas, HTML was designed to display data.
|
||||
2. HTML uses predefined tags while XML uses user defined tags.
|
||||
|
||||
XML helps simplify:
|
||||
XML helps simplify:
|
||||
1. data sharing
|
||||
2. data transport
|
||||
3. platform changes
|
||||
@ -73,8 +72,8 @@ It became a W3C Recommendation as early as in February 1998!
|
||||
|
||||
## Transform to HTML with XSL
|
||||
As mentioned above, XML is primarirly used to carry data, but there are some scenarios where you to represent the information in more user friendly way.
|
||||
For this we have XSLT(eXtensible Stylesheet Language Transformations) or simply XSL, with help of it we can represent the XML data in HTML.
|
||||
XML + XSL = HTML
|
||||
For this we have XSLT(eXtensible Stylesheet Language Transformations) or simply XSL, with help of it we can represent the XML data in HTML.
|
||||
XML + XSL = HTML
|
||||
|
||||
### More information
|
||||
|
||||
|
Reference in New Issue
Block a user