0% found this document useful (0 votes)
58 views33 pages

Extensible: Markup Language

XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is designed to be simple, flexible, and usable over the internet. XML allows users to define their own elements and tags to represent data, making it highly extensible and readable by both humans and computers. Key features of XML include its compatibility with many programming languages and applications, its portability across different platforms, and its ability to represent arbitrary data structures.
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 PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views33 pages

Extensible: Markup Language

XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is designed to be simple, flexible, and usable over the internet. XML allows users to define their own elements and tags to represent data, making it highly extensible and readable by both humans and computers. Key features of XML include its compatibility with many programming languages and applications, its portability across different platforms, and its ability to represent arbitrary data structures.
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 PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

XML

eXtensible Markup Language

Rijumone Choudhuri
Jaswinder Singh
Tejaswi
Anu Singh
Features and Advantages
What is XML?
XML is a set of rules for encoding documents in
machine-readable form. XML can represent almost
anything—files, graphics, Web services, etc.
Extensible Markup Language (XML) is a simple,
very flexible text format. Originally designed to
meet the challenges of large-scale electronic
publishing, XML is also playing an increasingly
important role in the exchange of a wide variety of
data on the Web and elsewhere.
XML's design goals emphasize simplicity,
generality, and usability over the Internet.  It is
a textual data format, with strong support
via Unicode for the languages of the world.
Although XML's design focuses on documents,
it is widely used for the representation of
arbitrary data structures.
There are many programming interfaces that
software developers may use to access XML
data, and several schema systems designed to
aid in the definition of XML-based languages.
Features
Schema optimization: Efficient XML includes
the most flexible and effective set of schema
optimizations available.
Document optimizations: Efficient XML
includes advanced document optimizations that
leverage knowledge of XML and patterns
detected in a document to reduce file size.
Widely used, standard APIs: Efficient XML
can be used as a stand-alone compression utility
or integrated directly into host applications.
Parsing Optimizations: Applications can parse
and serialize Efficient XML faster than XML.
Incorporating Efficient XML into an existing
application will automatically accelerate the
application.
Fidelity optimizations: Efficient XML allows
applications to preserve or discard white space,
comments and other XML artifacts that may not
be needed by an application
Query results and document fragments: In
addition to representing XML documents,
Efficient XML can efficiently represent any list
of elements extracted from an XML document.
Extensible encoding rules: The set of Efficient
XML encoding rules can be customized, extended
or replaced by third parties to meet application
specific objectives.
Small, mobile and embedded systems: Efficient
XML is optimized for devices with extremely
limited resources, including mass market mobile
handsets.
Streaming support: Efficient XML supports full
streaming enabling applications to begin
generating results before reading the entire
document into memory.
Advantages
XML is fully compatible with applications like
JAVA, and it can be combined with any application
which is capable of processing XML irrespective
of the platform it is being used on.
XML is an extremely portable language to the
extent that it can be used on large networks with
multiple platforms like the internet, and it can be
used on handhelds or palmtops or PDAs.
XML is as easy as HTML.
The Advantages of XML in Java
XML uses the Common Component
Architecture or CCA, and the Common Object
Request Broker Architecture, or CORBA. In
other words, this means that it uses a common
and standard protocol which helps
interoperability for programs.
It also allows RMI, or remote method
invocation in Java and invokes another java
object. It also allows the clients to connect to
the program using the remote procedure
XML Advantages with Tags
The very first advantage with using tags in
XML is that XML allows you to create your
own tags, and you are not limited to a standard
set of tags that have to be used to program
which are predetermined by program vendors.
You can also have the freedom to develop at
your own pace and moreover develop tools that
will be helpful for your programming needs
without a lot of investment of time or money.
Here by defining your own tags you are
Advantages of XML in Format
XML overcomes all the limitations that
HTML has whether it is with the language or
the presentation of data or the structure. XML
is already known to be highly structured data
which solves the problem for users when it
comes to correlation or identifying similar
fields.
In XML the GUI can easily be extracted, and
changes can be made without disturbing the
existing data in any way.
Searching the data is all the more easy in
COMPONENTS OF XML

 COMMENTS

 ELEMENTS AND TAGS

 ATTRIBUTES
Attributes

Attributes are name value pairs associated with


elements. The name of an attribute may be any legal
XML name. The value may be any string of text, even
potentially including characters like < and ". The
document author needs to escape such characters as &
lt; and &quot;. However, the parser will resolve these
references before passing the data to your application.
The attribute value is enclosed in either single or
double quotes, and the name is separated from the
value by an equals sign
Elements and Tags

The fundamental unit of XML is the element. You can


write good XML documents without using any other
XML construct. If for some reason you have a grudge
against comments, processing instructions, attributes,
or namespaces, you can pretend they don’t exist and
still write well-formed XML documents. However, you
must use elements. Every XML document has at least
one element. You cannot write XML documents
without using elements.
 
Logically every element has four key pieces:
A name
The attributes of the element
The namespaces in scope on the element
The content of the element
In addition, once schemas become more prevalent and parsers and APIs
are revised to support them, it may also make sense to talk about the
element’s type. For now, though, there’s not a lot of practical help to be
gained by considering the type.
Furthermore, DOM and XPath also have mutually incompatible concepts
of the value of an element. However, in both cases, the value is derived
purely from the element content, so it’s not really a separate thing.
Comments

XML comments are almost exactly like HTML comments. They begin
with <!-- and end with -->. For example, here’s a comment you might
find in an order document:
<!-- Please make sure this order goes out ASAP! -->
Everything between the <!-- and the --> should be ignored. In fact, most
parsers and APIs do make the comments available to you if you want
them, mostly so you can round trip documents (read them in and then
write them back out again with everything still intact). However, beyond
this use case, you really shouldn’t pay much attention to comments in
your programs. Some HTML systems abuse comments to support server
side includes or editor specific extensions. Since XML is much more
flexible than HTML, however, you can use elements, attributes, or, as a
last resort, processing instructions for these use cases.
How XML works
Using XML to exchange information offers many
benefits, including the following:

Uses human, not computer, language. XML is


readable (and understandable, even by novices) and
no more difficult to code than HTML. Completely
compatible with Java and 100% portable. Any
application that can process XML (on any platform)
can use your information. Extendable. Create your
own tags (or use tags created by others) that use the
native language of your domain, have the attributes
you need, and make sense to you and your users.
The following example illustrates, in a simplified way, the readability and
extensibility of XML:
HTML example
<center>XML example
</center>
<HTML>
<H1 ID="MN">State</H1>
<H2 ID="12">City</H2>
<DL>
<DT>Name</DT>
<DD>Johnson</DD>
<DT>Population</DT>
<DD>5000</DD>
</DL>
<H2 ID="15">City</H2>
<DL>
<DT>Name</DT>
<DD>Pineville</DD>
<DT>Population</DT>
 <DD>60000</DD>
HTML tag names reveal nothing about the meaning of their
content. The example above uses an HTML definition list, but
the problems inherent in using HTML would occur if the data
were contained in a table or some other kind of HTML tags:
For example:
Many the HTML tags are acronyms, so they are not as readable
as common language.
HTML tags represent data (in this above example, city names
and populations) as items to display, for example, as
definitions in a list or cells in a table. This makes it difficult to
manipulate the data or or exchange it between applications.
The XML tag names are readable and convey the meaning of
the data. Each XML tag immediately precedes the associated
data, helping to make the information structure easily
discerned by both humans and computers. The data structure
follows a noticeable and useful pattern, making it easy to
manipulate and exchange the data.
XML, on the other hand, makes it possible to pay attention to
data structure, what it means, and what context it appears in.
With the aid of rules set by DTDs (Document Type
Definitions) and XML Schemas, this aspect makes it easier for
programs, such as search engines, to analyze an XML
document and find the information it needs (and in its correct
context). Plus, XML gives Web site developers the flexibility to
create their own set of customized tags for documents, which
can be transformed into multiple presentation styles. This
involves style sheets such as CSS (Cascading Style Sheets) and
XSL (Extensible Stylesheet Language). Combine an XML
document with one style sheet and it displays appropriately in
browser windows on desktop PCs; combine it with another
style sheet and the document is properly formatted for
printing; and combine that same XML document with another
style sheet to make it suitable for a mobile phone display.
Applications of XML
Enterprise Application Integration (EAI)
Using XML
Enterprise Application Integration (EAI)
is defined as the use of software and
computer systems architectural principles
to integrate a set of enterprise computer
applications.
Business Challenges
The various approaches to Enterprise Application Integration
(EAI) have evolved from defining interfaces to utilizing a
variety of middleware technologies such as Message Brokers,
J2EE Application Servers, COM, and CORBA.
The application integration almost always results in the
development of new business logic.
EAI projects force change upon many application and business
areas and require a coordinated approach among groups in an
enterprise that used to deal with their application and
infrastructure needs in a mostly independent way.
XML as an Interface

The disparate distributed applications need a


common platform to communicate with one
another. Because XML is not specific to any
proprietary platform, it can very well fit in that.
XML is not tied to a limited set of tags defined
by proprietary vendors. In other words, it
contains metadata. It allows each specific
industry to develop its own tag sets to meet its
unique needs.
XML handles both forward and backward data
The following is the sample XML data for customer
details:
 
<customer cust_id="3790">
<cust_name>Steve</cust_name>
<address>
<block>7432 Silver</block>
<city>Columbia</city>
<zip>89131</zip>
<phone>2345678</phone>
<mobile>4320659</mobile>
<date>01/06/1999</date>
Web Publishing
XML is designed to publish documents programmatically.
A developer or a designer writes stylesheets(Cascading
Style Sheets (CSS) is a style sheet language used to
describe the presentation semantics (the look and
formatting) of a document written in a markup language)

This is not unlike ASP( also known as Classic


ASP or ASP Classic, was Microsoft's first server-
side script-engine for dynamically-generated web pages)
or PHP(PHP: Hypertext Preprocessor is a widely used,
general-purpose scripting language that was originally
designed for web development to produce dynamic web
More importantly, the different products
implement different solutions, so they are
suitable for different types of projects. For
example, Cocoon is ideal for highly
dynamic sites, Vignette excels with very
large sites, and XM is for medium-sized
sites.
E commerce
XML promotes a message-oriented view of electronic
commerce that isolates business transactions
from differences in software, hardware, system
architectures, and application programming
languages.
Examples of business messages:
 purchase order from a buyer to a seller
 invoice from the seller back to the buyer
 request to make payment through a credit card
 authorization to use credit card
Web searching and automating Web tasks
By using XML, Web agents and robots (programs
that automate Web searches or other tasks) are more
efficient and produce more useful results.
Meta Data
A key role of enterprise content- management
products is to describe business data accurately
and consistently in meta data so that it can be
found with relative ease and speed and then
acted upon.
When using XML, applications need not
analyze how data is presented. Also, data
transformations from one context to another
can be achieved easily by using declarative
tools.
Conclusion
XML can be leveraged in many areas of enterprise
application development. It can be used for data
aggregation and management such as indexing,
metadata, and so forth. It also can be used to exchange
data among the distributed applications. It also
provides the environments for businesses needing to
exchange information in support of business-to-
business e-commerce.
THANK
YOU..!!!

You might also like