SlideShare a Scribd company logo
SAX
Simple API for XML (SAX)
SARASWATHI RAMALINGAM
SRI AKILANDESWARI WOMENS COLLEGE
SAX
• Both DOM and the Simple API for XML
(SAX) provide a programmatic layer that
allows a user to directly access the
information contained within an XML
document.
• However, each of these mechanisms
provides a different approach to accessing
this information.
SAX
• Whereas DOM creates an object that
represents a hierarchical tree of nodes that
reflects the structure of an XML document,
– SAX processes an XML document by giving
applications a stream of parsing events around
that document.
SAX
• Rather than interacting with an in-memory
XML tree, a user is interacting with a stream of
data that can be acted upon.
• DOM is great for in-memory tree manipulation,
whereas SAX is great for linear processing of
large XML documents.
• Event-based parsers such as SAX provide a
view of XML documents that is data centric
and event driven.
SAX
• DOM can also be used for creating
documents. Unlike DOM, SAX can only be
used for parsing existing documents.
• parser for the English language might break
up a document into paragraphs, words, and
punctuation.
• In the case of XML, the important pieces of
data include elements, attributes, text, and
so on. This is what SAX does.
SAX
• Some SAX parsers can validate a document
against a Document Type Definition (DTD).
• Validating parsers can also tell you
specifically where validation has failed.
SAX
• DOM is an in-memory tree structure of an
XML document or document fragment.
•
• DOM is a natural object model of an XML
document, but it’s not always practical.
• Large documents can take up a lot of
memory.
SAX
• SAX is, in many ways, much simpler than
DOM.
• There is no need to model every possible
type of object that can be found in an XML
document.
• This makes the API easy to understand and
easier to use.
SAX
• SAX is an event-based API.
• Instead of loading an entire document into memory all at
once, SAX parsers read documents and notify a client
program when elements, text, comments, and other data of
interest are found.
• SAX parsers send you events continuously, telling you what
was found next.
• The DOM parses XML in space, whereas SAX parses XML in
time.

More Related Content

PPTX
XSL - XML STYLE SHEET
SaraswathiRamalingam
 
PDF
Xpath tutorial
Ashoka Vanjare
 
PDF
Dom Hackking & Security - BlackHat Preso
Shreeraj Shah
 
PPTX
Xml dom
sana mateen
 
PPTX
Dom parser
sana mateen
 
PPTX
Xml processors
Saurav Mawandia
 
PPT
Understanding XML DOM
Om Vikram Thapa
 
XSL - XML STYLE SHEET
SaraswathiRamalingam
 
Xpath tutorial
Ashoka Vanjare
 
Dom Hackking & Security - BlackHat Preso
Shreeraj Shah
 
Xml dom
sana mateen
 
Dom parser
sana mateen
 
Xml processors
Saurav Mawandia
 
Understanding XML DOM
Om Vikram Thapa
 

What's hot (20)

PPTX
Publishing xml
Kumar
 
PPTX
Introduction to XML
Kumar
 
PPT
XML Databases
Jussi Pohjolainen
 
PPT
Xml
Sudharsan S
 
PDF
Xml databases
Srinivasan R
 
PPTX
XML Document Object Model (DOM)
BOSS Webtech
 
PPT
XML and Databases
Cittrex
 
PPTX
Xml and xml processor
Himanshu Soni
 
PDF
Xml schema
Dr.Saranya K.G
 
PPTX
Data exchange over internet (XML vs JSON)
Wajahat Shahid
 
PPT
Intro to XML in libraries
Kyle Banerjee
 
PPT
Xml and DTD's
Swati Parmar
 
PPT
Xml nisha dwivedi
NIIT
 
PPTX
Introductionto xslt
Kumar
 
Publishing xml
Kumar
 
Introduction to XML
Kumar
 
XML Databases
Jussi Pohjolainen
 
Xml databases
Srinivasan R
 
XML Document Object Model (DOM)
BOSS Webtech
 
XML and Databases
Cittrex
 
Xml and xml processor
Himanshu Soni
 
Xml schema
Dr.Saranya K.G
 
Data exchange over internet (XML vs JSON)
Wajahat Shahid
 
Intro to XML in libraries
Kyle Banerjee
 
Xml and DTD's
Swati Parmar
 
Xml nisha dwivedi
NIIT
 
Introductionto xslt
Kumar
 
Ad

Similar to XML - SAX (20)

PPT
XML
thotasrinath
 
DOCX
Unit 2.3
Abhishek Kesharwani
 
PPT
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
PDF
X Usax Pdf
nit Allahabad
 
PDF
Unit 2.3
Abhishek Kesharwani
 
PDF
Understanding Sax
LiquidHub
 
PPTX
SAX
Tilakpoudel2
 
PDF
Service Oriented Architecture - Unit II - Sax
Roselin Mary S
 
PDF
Xml parsing
Malintha Adikari
 
PPT
Xml parsers
Manav Prasad
 
PDF
Python xml processing
Learnbay Datascience
 
PPTX
Unit iv xml dom
smitha273566
 
PPTX
WEB PRORAMMING NOTES WITH EXAMPLE PROGRAMS
SATHYABAMAMADHANKUMA
 
PPT
5 xml parsing
gauravashq
 
PDF
Web Technologies (8/12): XML & HTML Data Processing. Simple API for XML. Simp...
Sabin Buraga
 
PPT
Session 5
Lại Đức Chung
 
PPT
Xm lparsers
Suman Lata
 
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
X Usax Pdf
nit Allahabad
 
Understanding Sax
LiquidHub
 
Service Oriented Architecture - Unit II - Sax
Roselin Mary S
 
Xml parsing
Malintha Adikari
 
Xml parsers
Manav Prasad
 
Python xml processing
Learnbay Datascience
 
Unit iv xml dom
smitha273566
 
WEB PRORAMMING NOTES WITH EXAMPLE PROGRAMS
SATHYABAMAMADHANKUMA
 
5 xml parsing
gauravashq
 
Web Technologies (8/12): XML & HTML Data Processing. Simple API for XML. Simp...
Sabin Buraga
 
Xm lparsers
Suman Lata
 
Ad

More from SaraswathiRamalingam (20)

PPTX
MACINTOSH
SaraswathiRamalingam
 
PPTX
XML SCHEMAS
SaraswathiRamalingam
 
PPTX
XML DTD DOCUMENT TYPE DEFINITION
SaraswathiRamalingam
 
PPTX
Georg scheutz - Charles babbage - Saraswathi Ramalingam
SaraswathiRamalingam
 
PPTX
Dennis ritchie - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
LAB PROGRAMS SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PPTX
Mobile Computing - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
XML DTD DOCUMENT TYPE DEFINITION
SaraswathiRamalingam
 
Georg scheutz - Charles babbage - Saraswathi Ramalingam
SaraswathiRamalingam
 
Dennis ritchie - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
LAB PROGRAMS SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Mobile Computing - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 

Recently uploaded (20)

PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PPTX
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
PDF
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 

XML - SAX

  • 1. SAX Simple API for XML (SAX) SARASWATHI RAMALINGAM SRI AKILANDESWARI WOMENS COLLEGE
  • 2. SAX • Both DOM and the Simple API for XML (SAX) provide a programmatic layer that allows a user to directly access the information contained within an XML document. • However, each of these mechanisms provides a different approach to accessing this information.
  • 3. SAX • Whereas DOM creates an object that represents a hierarchical tree of nodes that reflects the structure of an XML document, – SAX processes an XML document by giving applications a stream of parsing events around that document.
  • 4. SAX • Rather than interacting with an in-memory XML tree, a user is interacting with a stream of data that can be acted upon. • DOM is great for in-memory tree manipulation, whereas SAX is great for linear processing of large XML documents. • Event-based parsers such as SAX provide a view of XML documents that is data centric and event driven.
  • 5. SAX • DOM can also be used for creating documents. Unlike DOM, SAX can only be used for parsing existing documents. • parser for the English language might break up a document into paragraphs, words, and punctuation. • In the case of XML, the important pieces of data include elements, attributes, text, and so on. This is what SAX does.
  • 6. SAX • Some SAX parsers can validate a document against a Document Type Definition (DTD). • Validating parsers can also tell you specifically where validation has failed.
  • 7. SAX • DOM is an in-memory tree structure of an XML document or document fragment. • • DOM is a natural object model of an XML document, but it’s not always practical. • Large documents can take up a lot of memory.
  • 8. SAX • SAX is, in many ways, much simpler than DOM. • There is no need to model every possible type of object that can be found in an XML document. • This makes the API easy to understand and easier to use.
  • 9. SAX • SAX is an event-based API. • Instead of loading an entire document into memory all at once, SAX parsers read documents and notify a client program when elements, text, comments, and other data of interest are found. • SAX parsers send you events continuously, telling you what was found next. • The DOM parses XML in space, whereas SAX parses XML in time.