XML and Application Integration

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

XML and Application Integration

The Value of XML


 XML provides a common-data exchange format,
encapsulating both data and metadata
 Promotes a self-defining message structure
o A standard format of information exchange on
the Internet
o An infrastructure for information exchange and
management in the world of application XML Schema
integration
 XML document is created based on vocabulary of
 XML provides a robust, human-readable
elements
information exchange standard
 Vocabularies can be defined formally using a
o Supports the exchange of application semantics
schema
and information content
o Provides an application-level mechanism for definition language, XML Schema
producing business information o Protect integrity of XML document data by
 Applications do not need to understand anything providing structure, validation rules, data type
about one other constraints, and inter-element relationships
XML Meets Middleware  Plays an important role as an enterprise data
transport standard as it greatly refines the quality of
 Middleware simply “carries the load” XML data
o It moves messages that encapsulate or abstract
 Schema allows authors to establish logical domains
XML to which some or all parts of a schema can be
o Ensures that those messages are understood by applied
any source or target applications that need the  XML Schema dictates what can and cannot be done
information with XML data, in same way database schema
 Middleware manage the interfaces with the source establish a structural model for data they represent.
or target application
o Move information into and out of application
o Need necessary changes to source and target
applications to consume and produce XML
 XML demands huge overhead
o XML document uses more bytes than binary
message
XML: Elements
Elements - Basic building blocks of an XML document XML Schema and XML Document
Defined by tags - Starting tag and an ending tag
Root element - Outermost element in the XML
document
XML supports nested elements - Elements within
elements. This ability allows XML to support
hierarchical structure
Element names describe the content of the element
Structure describes the relationship between the
elements
Attributes of an element - Describe characteristics of
the elements in the beginning tag of an element

Relationship between XML specifications


XML Parsers
 XML parsers reads XML document and extracts
the data for access by another program
 Document Object Model (DOM) - Tree-based API
 Simple API for XML (SAX) – event based API

XML Namespaces
 A namespace is a collection of names that may be XSLT Mechanism
used in an XML document as elements or attribute Transforming an XML document using XSLT
names requires two main steps
o Identify names with a particular domain and 1. Structural transformation
avoid redundancy - Data is transformed from the input structure to the
o Allow use of the same name with two different output structure
meanings - Involves selecting data, grouping it, sorting it, or
 Namespaces are identified by a Uniform Resource aggregating it
Indicator (URI) 2. Formatting the text to new characteristics
o Which allows each namespace to be unique - Information is placed in a particular type of text
structure. E.g., XML, HTML, PDF, etc
 Example – we may have three elements known as
“account”
o Frequent-flyer account
o Bank account
o Customer account at hotel
o Each account name is associated with a
particular domain
 Airline URI (http://www.airline.org)
o Associate the element with a particular
namespace XSLT Processors
 http://www.airline.org.account  XSLT processors apply an XSLT style sheet to an
 The importance of XML namespace in the context XML source document and thus create a resulting
of application integration is their ability to define document
common application semantics between trading o While remaining consistent with the way
partners processors handle XML through trees
What is XSLT?  XSLT must process three trees
 Extensible Stylesheet Language Transformations 1. Input tree
(XSLT) 2. Stylesheet tree
o Language designed to transform one XML 3. Output tree
document into another changing both its  Stylesheet document defines the transformation to
schema and content in the process occur
o At its most primitive, it is text processing o XSLT processor uses stylesheet tree to
system transform the input tree to the output tree
o Can generate other standard markup languages
 XSLT provides a standard XML document-
transformation mechanism using a stylesheet as a
common processing engine

XML can establish a standard data transport forma


within and between application tiers
XML documents can be used as the standard data
transport throughout integrated environments
Presentation centric transformations can be
incorporated to output data for different mediums

XSD schemas validating incoming data for each


application endpoint

XSLT can perform dynamic structural transformations

You might also like