0% found this document useful (0 votes)
9 views15 pages

Presentation 132

Uploaded by

Sunil Pillai
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views15 pages

Presentation 132

Uploaded by

Sunil Pillai
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

MARKUP LANGUAGE HISTORY

 PROCEDURAL MARKUP
 GENERIC CODING
 SGML
 HTML
 XML
INTRODUCTION TO XML
 What is XML?
 Is XML SGML?
 Is XML HTML?
 Why Must We Switch to XML?
 Why Not Go Back to SGML?
Document Structure

 An XML document has an hierarchical


structure with two sections: Prolog and Body.
 Prolog which constitutes of XML declaration
statement (<? xml version...), and
Comments.
 The XML declaration statement identifies the
current document as an XML document, and
has three attributes version (compulsory),
encoding and standalone (both are optional).
XML Syntax

 All XML elements must <p>This is a paragraph :incorrect


have a closing tag <p>This is a paragraph</p>  :correct
 XML tags are case <Message>This is incorrect</message>
sensitive <message>This is correct</message>
 All XML elements must
be properly nested <b><i>This text is bold and italic</b></i>
<b><i>This text is bold and italic</i></b>
 With XML, white space
is preserved
XML Element

 XML Elements are extensible


 XML Elements have Relationships
 Elements have different Content
XML Elements are extensible

<note>
<to>Tove</to>
<from>Jani</from>
<body>Don't forget me this weekend!</body>
</note>

<note>
<date>2002-08-01</date>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
XML Elements have relationship

<book>
<title>My First XML</title>
<prod id="33-657" media="paper"></prod>
<chapter>Introduction to XML
<para>What is HTML</para>
<para>What is XML</para>
</chapter>
<chapter>XML Syntax
<para>Elements must have a closing tag</para>
<para>Elements must be properly nested</para>
</chapter>
</book>
XML Attributes

 XML elements can <img src="computer.gif">


have attributes. <a href="demo.asp">
 Attributes are used to
provide additional
<person sex="female">
information about
<firstname>Anna</firstname>
elements.
<lastname>Smith</lastname>
 Avoid using attributes? </person>
Or
<person>
<sex>female</sex>
Difference Between HTML AND XML

 XML and HTML were designed with different


goals
 XML is free and extensible
 HTML is a very Complex than XML
 XML is a case-sensitive
 With XML, white space is preserved
XML Browser

 Internet Explorer 5.0 onwards.


 Netscape 6.0 onwards.
 Mozilla 0.9 onwards.
CONCLUSION

Extensible Markup Language (XML) is the


universal format for data on the Web. XML
allows developers to easily describe and
deliver rich, structured data from any
application in a standard, consistent way.
XML does not replace HTML; rather, it is a
complementary format.
Useful Links

 XML 1.0 Specification


– http://www.w3.org/TR/REC-xml
 Annotated XML 1.0 Specification
– http://www.xml.com/axml/testaxml.htm
 Informational web sites
– http://www.xml.com/
– http://www.xmlhack.com/

You might also like