Download presentation
Presentation is loading. Please wait.
Published byAngelica Maxwell Modified over 9 years ago
1
By: Shawn Li
2
OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and DOM When to use
3
What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive XML is a W3C Recommendation XML is used for the representation of arbitrary data structure
4
What to retain from that?
5
HTML vs. XML representation
6
Advantages of XML Readability XML document is plain text and human readable, To edit/view XML documents any simple text editor will suffice Hierarchical XML document has a tree structure which is powerful enough to express complex data and simple enough to understand Language Independent XML documents are language neutral. For e.g. a Java program can generate a XML which can be parsed by a program written in C++ or Perl OS Independent XML files are Operating System independent
7
Facts about XML XML is Everywhere XML is now as important for the Web as HTML was to the foundation of the Web. XML is the most common tool for data transmissions between all sorts of applications. XML became a W3C Recommendation on February 10, 1998. With XML You Invent Your Own Tags XML language does not have any predefined tags, they are invented by the author.
9
XML - utilization Messaging Where applications or organizations exchanges data between them Database The data extracted from the database can be preserved with original information and can be used for more than one application in different ways. Service Oriented Architecture (SOA) The neutral and generalized format are ideal for data exchange because to simplify reuse of program components the individual services need to send and receive data in general formats.
10
XML – utilization (Continue) As of 2009, hundreds of document formats using XML has been developed, this includes: RSS Atom SOAP XHTML
11
XML – utilization (Continue) Default based format for many applications and tools: Microsoft Office OpenOffice LibreOffice Apple’s iWork Microsoft.NETFramework configuration Apple’s registry
12
What is SAX? SAX stands for Simple API for XML SAX is an event-based parser API for XML documents SAX provides a mechanism for reading data from an XML document
13
What is DOM? DOM stands for Document Object Model DOM is a cross-platform and language independent convention DOM represents and interacts with object in HTML, XHTML, and XML.
15
History of DOM Legacy -> Intermediate -> standardization Legacy Netscape Communication released Javascript in 1996 and Microsoft released Jscript the same year. Able to detect user-generated events and modifying the HTML document Netscape Navigator 2.0 and IE 3.0
16
History of DOM (Continue) Legacy -> Intermediate -> standardization Intermediate Netscape and Microsoft released version 4.0 of Netscape Navigator and IE respectively in 1997. Dynamic HTML, enabling changes to a loaded HTML document. Incompatible to each other’s browser.
17
History of DOM (Continue) Legacy -> Intermediate -> standardization Standardization World wide web brought Netscape and Microsoft together to developed ECMAScript, standardized scripting language. Then…. DOM 1, 2, 3, 4
18
COMPARISON - SAX Parses node by node Doesn’t store the XML in memory Cannot insert or delete a node Doesn’t preserve comments Generally runs a little faster than DOM Stream-based processor Tiny part in memory at a time
19
COMPARISON - DOM Store the entire XML document Occupies more memory Can insert or delete nodes Traverse in any direction Preserve comments Slower in speed compare to SAX
20
When to use? SAX: No structural modification Huge XML files. So this is most practical in working with large datasets. DOM: Manipulate the document Traverse the document back and forth Small XML file
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.