【文章內(nèi)容簡(jiǎn)介】
ansforming an XML document into any other format. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 34 XPath Language for addressing parts of an XML document. Used by other technologies, not as a standalone technology. Used by XSLT and XPointer. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 35 XML Parsing Provides an API for a program to access pieces of an XML document Two API standards: DOM and SAX. Both perform processing of XML documents, but in distinct ways. Parsers help with: Validation. Well formedness checking. Building a document tree (DOM). Notifying the application of errors. Most parsers can handle files and streams. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 36 SAX Parser SAX Simple API for XML Processing. Reads an XML document as a stream. Eventbased notification. Good for searching and very large documents. Defacto standard by Dave Megginson. Not from W3, but very widely accepted and used. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 37 Processing Steps 1. Application creates SAX parser. 2. Parser reads in DTD or Schema, and begins reading in XML. 3. Parser fires an event on every item it reads (start tag, end tag, text, errors, and so forth). 4. The Application is free to handle or ignore each event it receives from the parser. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 38 DOM Parser DOM Document Object Model. Parses and loads entire document into memory. Represents a tree based structure of resulting object. Good for manipulation of the content and smaller documents. W3C remendation 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 39 Processing Steps 1. Application creates DOM parser. 2. Parser reads in XML and DTD or Schema. 3. Parser returns any errors to the application. 4. Parser generates a DOM tree. 5. Application is free to read, write, or update the DOM tree. 6. Application writes final XML to output. 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 40 二、 Web Services 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 41 Web 服務(wù):從服務(wù)談起 產(chǎn)品有限 ,服務(wù)無(wú)限 “應(yīng)用基地化 (application hosting)‖—— 軟件正變?yōu)榉?wù) 所謂“應(yīng)用基地化”是指軟件廠家在自己的服務(wù)器上運(yùn)行應(yīng)用程序,經(jīng)由 Inter將其結(jié)果提供給用戶企業(yè)利用。這使得用戶將通過(guò)租軟件而不是買軟件來(lái)滿足自己的需要。 以 Oracle和 Microsoft為首的主要軟件廠家,開(kāi)始真正加入應(yīng)用基地化等服務(wù)事業(yè),各廠家正加強(qiáng)同應(yīng)用服務(wù)提供商 (Application Service Provider,ASP)的合作關(guān)系。 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 42 ASP在興起 開(kāi)始對(duì)服務(wù)下大力氣的軟件公司,正對(duì)經(jīng)由Inter簡(jiǎn)單地分發(fā)自己軟件產(chǎn)品的管理模式進(jìn)行改造,使得軟件公司本身和第三方,可以通過(guò)遠(yuǎn)程操作支持應(yīng)用。 例如,德國(guó) SAP公司已開(kāi)始提供名為“ Business Scenario‖的服務(wù),這是一種提供在 Web環(huán)境下利用的一群軟件組件所構(gòu)成的應(yīng)用服務(wù)。 IBM的服務(wù)事業(yè)部門從事 eBusiness應(yīng)用基地化的負(fù)責(zé)人認(rèn)為,企業(yè)今后將像使用電話一樣,按使用量支付軟件使用費(fèi),這一時(shí)刻的到來(lái)便意味著軟件業(yè)革命的開(kāi)始。 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 43 Web service的出現(xiàn)背景 Web應(yīng)用的快速發(fā)展 Web應(yīng)用與傳統(tǒng)應(yīng)用之間存在連接鴻溝 Web應(yīng)用 : Page based 傳統(tǒng)應(yīng)用 : Module based Web應(yīng)用 數(shù)據(jù)重復(fù)遷移 傳統(tǒng)應(yīng)用 企業(yè)應(yīng)用的集成整合要求迫切 EAI (Enterprise Application Integration) B2Bi (B2B Integration) 語(yǔ)言差異、平臺(tái)差異、協(xié)議差異、數(shù)據(jù)差異帶來(lái)高代價(jià)的系統(tǒng)集成 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 44 Web 服務(wù):電子商務(wù)的新天地 Web 是為了程序到用戶的交互 而 Web 服務(wù)是為程序到程序的交互做準(zhǔn)備 建立在現(xiàn)有的和新興的標(biāo)準(zhǔn)之上, HTTP、XML、 SOAP、 WSDL、 UDDI Web 服務(wù)使應(yīng)用程序的集成比以前更快、更容易而且更便宜 集成在協(xié)議棧中較高層發(fā)生,它基于更注重服務(wù)語(yǔ)義而不那么注重網(wǎng)絡(luò)協(xié)議語(yǔ)義的消息,從而實(shí)現(xiàn)了業(yè)務(wù)功能的松散集成 2020年 11月 4日 9時(shí) 56分 山東大學(xué)計(jì)算機(jī)學(xué)院 45 Web Service的概念 提供一個(gè)與操作系統(tǒng)無(wú)關(guān)、與程序設(shè)計(jì)