Docsity

XML: A Markup Language for Data Description, Exercises of Web Design and Development

Partial preview of the text

Download XML: A Markup Language for Data Description and more Exercises Web Design and Development in PDF only on Docsity!

INTRODUCTION TO XML

MS.EV

  • XML is not a replacement for HTML.
  • XML and HTML were designed with different goals:
  • XML was designed to describe data, with focus on what data is
  • HTML was designed to display data, with focus on how data looks
  • HTML is about displaying information, while XML is about carrying information

XML RULES TO FOLLOW

STRUCTURE/SYNTAX OF ELEMENTS IN XML DOCUMENT

XML ATTRIBUTES

XML COMMENT

XML Documents Form a Tree Structure XML documents must contain a root element. This element is "the parent" of all other elements. The elements in an XML document form a document tree. The tree starts at the root and branches to the lowest level of the tree. All elements can have sub elements (child elements):

.....

With XML You Invent Your Own Tags

  • The tags in the example above like ( and ) are not defined in any XML standard.
  • These tags are "invented" by the author of the XML document.
  • That is because the XML language has no predefined tags
  • The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like

    ,

    , etc.).
  • XML allows the author to define his/her own tags and his/her own document structure.

XML Makes Your Data More Available

  • You can use XML to transfer data from a sever to a client vice versa
  • With XML, your data can be available to all kinds of "reading machines" (Handheld computers, voice machines, news feeds, etc.)