0% found this document useful (0 votes)
9 views

Extensible Markup Language

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Extensible Markup Language

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Extensible Markup

language (XML)

Anand Saundarya SY CSE


P.E.S. College of Engg.
Contents
1. Introduction of XML

2. Literature Survey /history about XML

3. Principle of Working

4. Architecture

5. Applications

6. Advantages of XML

7. Disadvantages of XML
1. Introduction:
What is XML?

• eXtensible Markup Language


• Markup language for documents containing structured
information.
• XML is a software- and hardware-independent tool for
storing and transporting data
• XML was designed to store and transport data
• It is also used to create web pages and web applications. It is
dynamic because it is used to transport the data not for displaying
the data.

• The design goals of XML focus on simplicity, generality, and


usability across the Internet. It is a textual data format with strong
support via Unicode for different human languages.
2. literature survey/ history about
XML:
• XML, in full extensible markup language, a document formatting
language used for some World Wide Web pages.

• Version 1.0 introduced by World Wide Web Consortium (W3C) in


1998

• Based on Standard Generalized Markup Language (SGML)


Standard Generalized Markup Language by Charles Goldfarb,
along with Ed Mosher and Ray Lorie in the 1970s while working at
IBM
Features of XML:
• XML is dynamic in nature.

• XML simplifies platform changes

• XML is a markup language


much like HTML

• XML data is stored in plain text format.


This provides a software- and
hardware-independent way of storing
data.
• XML was designed to be self-descriptive

• XML was designed to describe data.

• XML tags are not predefined unlike HTML

• XML example of semi structured data

• Bridge for data exchange on the Web


3. Principle of working:

XML is in principle transparent. It is written in generic ASCII


(American Standard code for Information Interchange) code. Its
ability to handle global commerce (requiring the use of many
alphabets and special symbol sets) is strengthened by its
provisions for handling Unicode, a standard international-character
encoding scheme.
4. Architecture Diagram / Syntax :
EG: Output:

<?
xml version="1.0" encoding=
"UTF-8"?>
<note>
<date>2015-09-01</date>
<hour>08:30</hour>
<to>Tove</to>
<from>Jani</from>
<body>Don't forget me
this weekend!</body>
</note>
5. Applications:

• Web publishing: XML allows you to create interactive pages, allows the
customer to customize those pages, and makes creating e-commerce
applications more intuitive. With XML, you store the data once and then
render that content for different viewers or devices based on style sheet
processing using an Extensible Style Language (XSL)/XSL Transformation
(XSLT) processor.
• e-business applications: XML implementations make electronic data
interchange (EDI) more accessible for information interchange,
business-to-business transactions, and business-to-consumer
transactions.

• Metadata applications: XML makes it easier to express metadata in a


portable, reusable format.

• General applications: XML provides a standard method to access


information, making it easier for applications and devices of all kinds to
use, store, transmit, and display data.
• Web searching and automating Web tasks: XML defines the type of
information contained in a document, making it easier to return useful
results when searching the Web

For example, using HTML to search for books authored by Tom Brown is likely to return instances of the
term 'brown' outside of the context of author. Using XML restricts the search to the correct context (for
example, the information contained in the <author> tag) and returns only the information that you want.
By using XML, Web agents and robots (programs that automate Web searches or other tasks) are more
efficient and produce more useful results.
How the program is executed?
Projects and applications based on XML

1. Layout for Text to speech


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:transitionGroup="true">

<TextView android:text="Text to Speech" android:layout_width="wrap_content"


android:layout_height="wrap_content"
android:id="@+id/textview"
android:textSize="35dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tutorials point"
android:id="@+id/textView"
android:layout_below="@+id/textview"
android:layout_centerHorizontal="true"
android:textColor="#ff7aff24"
android:textSize="35dp" />
2. A basic tip calculator app

So here’s a tip calculator for tipping to the waiter


<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context=".MainActivity">

<EditText
android:id="@+id/cost_of_service"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:hint="@string/cost_of_service"
android:inputType="numberDecimal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/service_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/how_was_the_service"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cost_of_service" />

<RadioGroup
android:id="@+id/tip_options"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checkedButton="@id/option_twenty_percent"
3. Login screen layout
<?xml version = "1.0" encoding = "utf-8"?>
<RelativeLayout xmlns:android =
"http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height = "match_parent"
android:paddingLeft= "@dimen/activity_horizontal_margin"
android:paddingRight =
"@dimen/activity_horizontal_margin"
android:paddingTop = "@dimen/activity_vertical_margin"
android:paddingBottom =
"@dimen/activity_vertical_margin" tools:context =
".MainActivity">

<TextView android:text = "Login"


android:layout_width="wrap_content"
android:layout_height = "wrap_content"
android:id = "@+id/textview"
android:textSize = "35dp"
Advantages of XML:

• Makes documents transportable across systems and applications.


With the help of XML, you can exchange data quickly between
different platforms.

• It is a markup language, which is a set of characters or/and


symbols placed in a text document.

• It supports multilingual documents and Unicode

• It simplifies the platform change process.


• Provide relatively easy to learn and code.

• It is a markup language, which is a set of characters or/and symbols


placed in a text document.

• XML separates the data from HTML.


Disadvantages of XML

• XML requires a processing application.

• The XML syntax is similar to another alternative ‘text-based’


data transmission formats, which is sometimes confusing.

• No intrinsic data type support

• The XML syntax is redundant.

• Does not allow the user to share images as data.

You might also like