1 / 7

XML API

XML API. Chen.Pai-kai 2002/5/21. Outline. Why we need XML API? SAX and DOM JAXP XML data binding Using different API in different cases. Why we need XML API ?. 以一套通用的方法來存取 XML 檔案 免去自己寫 parser 的麻煩 公開的標準 , 方便移植 各種 API 適合不同的場合. SAX and DOM.

cecil
Download Presentation

XML API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML API Chen.Pai-kai 2002/5/21

  2. Outline • Why we need XML API? • SAX and DOM • JAXP • XML data binding • Using different API in different cases

  3. Why we need XML API ? • 以一套通用的方法來存取XML檔案 • 免去自己寫parser的麻煩 • 公開的標準,方便移植 • 各種API適合不同的場合

  4. SAX and DOM • DOM(Document Object Model):將XML文件視為樹狀結構的節點;可讀可寫可修改,使用彈性最大;w3c標準 • SAX(Simple API for XML):Event-driven模型;循序讀取,速度快,不可寫入;業界通用標準

  5. JAXP • JAXP:Java API for XML Parsing • JAXP supports processing of XML documents using DOM, SAX, and XSLT. • JAXP enables applications to parse and transform XML documents independent of a particular XML processing implementation.

  6. XML data binding • Accessing XML without writing code. • JAXB,Castor,Zeus…..etc.

  7. Using different API in different case

More Related