1 introduction to xml. xml extensible implies that users define tag content markup implies it is a...

19
1 Introduction to XML Introduction to XML

Post on 19-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

11

Introduction to XMLIntroduction to XML

Page 2: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

XML

• eXtensible implies that users define tag contentMarkup implies it is a coded documentLanguage implies it is a metalanguage used to define other languages

• XML is a subset of the Standard Generalized Markup Language (SGML).

Page 3: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

Why use XML?

• XML supports a wide variety of applications• XML is compatible with SGML, the earlier

generalized markup language• XML documents are human-legible; ie.,

readable • XML design is formal, consistent, and concise.

Page 4: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

Why use XML?

• XML allows the user to customize tags for specific applications

• XML facilitates open storage and exchange of data• XML is capable of self-documenting data and data

schemas• XML can be read by humans and machines• XML is platform-independent so that data can be

shipped to or read from any client application.

Page 5: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

55

XML Overview (cont.)XML Overview (cont.)• XpathXpath

– One of a set of XML technologies supporting XQuery One of a set of XML technologies supporting XQuery development, locating data in XML documentsdevelopment, locating data in XML documents

• XLinkXLink– XML markup language for creating hypertext linksXML markup language for creating hypertext links

• XPointerXPointer– Used along with Xlink for establishing hypertext links to Used along with Xlink for establishing hypertext links to

URI referencesURI references• XQueryXQuery

– XML transformation language allowing applications to XML transformation language allowing applications to query relational databases and XML dataquery relational databases and XML data

Page 6: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

66

Sample XML SchemaSample XML Schema

Schema is a record definition, analogous to the Create SQL statement, and therefore provides metadata

Page 7: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

77

Sample XML Document DataSample XML Document Data

XML data involves elements and attributes defined in the schema, and is analogous to inserting a record into a database

Page 8: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

88

Another Sample XML DocumentAnother Sample XML Document

Page 9: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

99

Sample XPath Expressions for Sample XPath Expressions for PVFC.xmlPVFC.xml

Page 10: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

1010

Web ServicesWeb Services• XML-based standards that define protocols for automatic XML-based standards that define protocols for automatic

communication between applications over the Webcommunication between applications over the Web• Web Service Components:Web Service Components:

– Universal Description, Discovery, and Integration (UDDI)Universal Description, Discovery, and Integration (UDDI)• Technical specification for distributed registries of Web services and Technical specification for distributed registries of Web services and

businesses open to communication on these servicesbusinesses open to communication on these services– Web Services Description Language (WSDL)Web Services Description Language (WSDL)

• XML-based grammar for describing Web services and providing public XML-based grammar for describing Web services and providing public interfaces for these servicesinterfaces for these services

– Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)• XML-based communication protocol for sending messages between XML-based communication protocol for sending messages between

applications via the Internetapplications via the Internet

Page 11: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

XML’s Applications

• Web Services • Protocols and standards for exchanging data

between diverse applications• Applications written in different programming

languages and running on different platforms can exchange data through web services

• XML data can be interchanged between applications using common protocols such as HTTP, SMTP, FTP, and XMPP.

Page 12: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

Source: http://www.zdnet.co.uk

1. Discovery - Search UDDI site(s) for the proper Web service.

2. Description - A description of the selected Web service is returned to the client application as a Web Services Description Language (WSDL) file.

3. Proxy creation - A local proxy to the remote service is created.

4. Soap Message Creation - a Soap/XML message is created and sent to the URL specified in the WSDL file.

5. Listener - A Soap listener at the host site receives the call and interprets it for the Web Service.

6. The Web service performs its function, and returns the result back to the client, via the listener and the proxy

Page 13: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

1414

Figure 10-7 Web services deployment (adapted from Newcomer, 2002)

Page 14: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

Specific Applications• Most XML applications, at their core, thrive because of the

open data interchange capabilities of XML– Really Simple Syndication (RSS) - provides data packets containing

short descriptions of web content combined with links to entirety of the content. The XML file is called an RSS feed

– EDI- XML provides a standard format to describe different types of data -- for example, a loan application, an invoice, healthcare claim, project status -- so that the information can be decoded, manipulated, and structured consistently

– B2B - Electronic Business Orders (ebXML) are a set of specifications designed to provide open XML-based infrastructure for global use of XML for electronic business information communication

– Interactive Financial Exchange (IFX) – an XML-based messaging protocol for the exchange of financial data

Page 15: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

1616

Service Oriented ArchitecturesService Oriented Architectures

• Collection of services that communicate with Collection of services that communicate with each other by passing dataeach other by passing data

• Web services, CORBA, Java, XML, SOAP, WSDLWeb services, CORBA, Java, XML, SOAP, WSDL• Loosely coupledLoosely coupled• InteroperableInteroperable• Using SOA results in increased software Using SOA results in increased software

development efficiency (up to 40%)development efficiency (up to 40%)

Page 16: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

SOA

• SOA has the goals of – increased interoperability (information exchange,

reusability, and composability)– increased federation (uniting resources and

applications while maintaining their individual autonomy and self-governance)

– increased business and technology domain alignment.

Source: http://en.wikipedia.org/wiki/Service-oriented_architecture

Page 17: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

SOA

• SOA is an architectural approach for constructing complex software-intensive systems from a set of universally interconnected and interdependent services.

• SOA realizes its business and IT benefits through utilizing an analysis and design methodology when creating services. – This methodology ensures that services remain consistent

with the architectural vision and roadmap, and– that they adhere to principles of service-orientation.

Source: http://en.wikipedia.org/wiki/Service-oriented_architecture

Page 18: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

SOA

• In summary: SOA defines how to integrate widely disparate applications for a world that is Web based and uses multiple implementation platforms. It usually is implemented through XML-based data interchange

Source: http://en.wikipedia.org/wiki/Service-oriented_architecture

Page 19: 1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage

2020

Semantic WebSemantic Web• W3C project using Web metadata to W3C project using Web metadata to

automate collection of knowledge and storing automate collection of knowledge and storing in easily understood formatin easily understood format

• Structuring based on:Structuring based on:– XMLXML– Resource Description Framework (RDF)Resource Description Framework (RDF)– Web Ontology Language (OWL)Web Ontology Language (OWL)