Why Are Developers Excited About XML?

Download Report

Transcript Why Are Developers Excited About XML?

ITSE 1456 – 01
Extensible Markup Language(XML)
Ade Buraimoh
1
Outline
• How semantic tagging makes XML documents easier
to maintain and develop than their HTML equivalents
• How to post XML documents on Web servers in a form
everyone can read
• How to make sure your XML is well-formed
• How to format your documents with CSS and XSL style
sheets
• How to validate documents with DTDs
• How to use entities to build large documents from
smaller parts
• How attributes describe data
• How to connect documents with XLinks and XPointers
2
What is XML
• Stands for Extensible Markup Language
• The first thing you need to understand about XML
is that it isn’t just another markup language like
HTML
• These languages define a fixed set of tags that
describe a fixed number of elements.
• It’s a language that lets you make up the tags you
need as you go along
• XML markup describes a document’s structure
and meaning
3
XML describes structure and semantics,
not formatting
• XML markup describes a document’s structure
and meaning
• http://www.w3.org/XML/
• http://www.w3schools.com/xml/
• http://www.w3schools.com/ajax/default.ASP
4
Related Technologies
• HTML
Separating content from presentation is an
extremely effective technique that improves both
the content and the appearance of the document.
Among other
things, it enables authors, programmers, and
designers to work more independently of each
other.
http://www.w3schools.com/html/ HTML tutorial
5
Sending and retrieving form data
Explorer,
Firefox
Apache, IIS, Tomcat
The Hypertext Transfer Protocol
https://developer.mozilla.org/enUS/docs/Web/Guide/HTML/Forms/Sending_and_retrieving_form_data
6
Related Technologies cont..
• CSS – Cascading Style Sheets
- define formatting properties such
as font size, font family, font weight, paragraph
indentation
• XSL – eXtensible Stylesheet Language
7
Related Technologies cont..
• XLinks
- XLinks enable any element to become a link
<PLAY xlink:type=”simple”
xmlns:xlink=”http://www.w3.org/1999/xlink”
xlink:href=
“http://cafeconleche.org/examples/shakespeare/tempest.xml”>
<TITLE>The Tempest</TITLE> by <AUTHOR>Shakespeare</AUTHOR>
</PLAY>
• XPointers
- XPointers allow links to point not just to a particular document at a
particular location,but to a particular part of a particular document
8
Why Are Developers Excited About
XML?
• Domain-specific markup languages
- XML enables individual professions (for example, music,
chemistry, human resources) to develop their own domainspecific markup languages
• Self-describing data
• Interchange of data among applications
- Java,ERP(PeopleSoft, SAP,etc…),
AJAX – Asynchronous JavaScript and XML
Use for pdf file
http://www.dynamicpdf.com/Products/DynamicPDFforJava
/Examples.csp
• Structured data
9
Self-describing data
•
•
•
•
•
•
•
•
•
•
<PERSON ID=”p1100” SEX=”M”>
<NAME>
<GIVEN>Judson</GIVEN>
<SURNAME> McDaniel</SURNAME>
</NAME>
<BIRTH>
<DATE>21 Feb 1834</DATE> </BIRTH>
<DEATH>
<DATE>9 Dec 1905</DATE> </DEATH>
</PERSON>
10
•
•
•
•
http://www.w3schools.com/xml/
http://it-ebooks.info/book/2004/
http://www.cafeconleche.org/books/bible/
https://developer.mozilla.org/enUS/docs/Web/Guide/HTML/Forms/Sending_and_retrieving_form_data
• http://www.ntu.edu.sg/home/ehchua/programming/java/j6d_xml.html
11