Introducción xml

Solo disponible en BuenasTareas
  • Páginas : 6 (1445 palabras )
  • Descarga(s) : 0
  • Publicado : 24 de noviembre de 2011
Leer documento completo
Vista previa del texto
Introduction to XML
by Jan Egil Refsnes

What is XML?
• • • • • • XML stands for EXtensible Markup Language XML is a markup language much like HTML. XML was designed to describe data. XML tags are not predefined in XML. You must define your own tags. XML is self describing. XML uses a DTD (Document Type Definition) to formally describe the data.

The main difference between XML and HTMLXML is not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. HTML is about displaying information, XML is about describing information.

XML is extensible
The tags used to markup HTML documents and the structure of HTML documents are predefined.The author of HTML documents can only use tags that are defined in the HTML standard. XML allows the author to define his own tags and his own document structure.

XML is a complement to HTML
It is important to understand that XML is not a replacement for HTML. In the future development of the Web it is most likely that XML will be used to structure and describe the Web data, while HTML will beused to format and display the same data.

XML in future Web development
We have been participating in XML development since its creation. It has been amazing to see how quickly the XML standard has been developed, and how quickly a large number of software vendors have adopted the standard.

We strongly believe that XML will be as important to the future of the Web as HTML has been to thefoundation of the Web. XML is the future for all data transmission and data manipulation over the Web.

How can XML be used?
• • • •

XML
 can
 keep
 data
 separated
 from
 your
 HTML
  XML
 can
 be
 used
 to
 store
 data
 inside
 HTML
 documents
  XML
 can
 be
 used
 as
 a
 format
 to
 exchange
 information
 XML
 can
 be
 used
 to
 store
 data
 in
 files
 or
 in
 databases
 
 

XML can keep data separated from your HTML
HTML pages are used to display data. Data is often stored inside HTML pages. With XML this data can now be stored in a separate XML file. This way you can concentrate on using HTML for formatting and display, and be sure that changes in theunderlying data will not force changes to any of your HTML code.


 

XML can also store data inside HTML documents
XML data can also be stored inside HTML pages as "Data Islands". You can still concentrate on using HTML for formatting and displaying the data.


 

XML can be used to exchange data
In the real world, computer systems and databases contain data in incompatibleformats. One of the most time consuming challenges for developers has been to exchange data between such systems over the Internet. Converting the data to XML can greatly reduce this complexity and create data that can be read by different types of applications.


 

XML can be used to store data
XML can also be used to store data in files or in databases. Applications can be written to store andretrieve information from the store, and generic applications can be used to display the data.

XML Syntax
An example XML document:
Tove Jani Reminder Don't forget me this weekend! The first line in the document: The XML declaration should always be included. It defines the XML version of the document. In this case the document conforms to the 1.0 specification of XML: The next linedefines the first element of the document (the root element): The next lines defines 4 child elements of the root (to, from, heading, and body): Tove Jani Reminder Don't forget me this weekend! The last line defines the end of the root element:


 
 

All XML elements must have a closing tag
In HTML some elements do not have to have a closing tag. The following code is legal in HTML:...
tracking img