SlideShare a Scribd company logo
SAX (SIMPLE API FOR XML)
PRESENTED BY:
TILAK POUDEL
NEPATHYA COLLEGE
6TH SEMESTER
SAX (SIMPLE API FOR XML)
• INTRIODUCTION:
• SAX (SIMPLE API FOR XML) IS AN EVENT-DRIVEN ONLINE
ALGORITHM FOR PARSING XML DOCUMENTS, WITH AN API DEVELOPED BY THE
XML-DEV MAILING LIST.
• SAX PROVIDES A MECHANISM FOR READING DATA FROM AN XML DOCUMENT
THAT IS AN ALTERNATIVE TO THAT PROVIDED BY THE DOCUMENT OBJECT
MODEL (DOM).
• SAX GENERETES NO PARSE TREE
SAX (SIMPLE API FOR XML)
• WHERE THE DOM OPERATES ON THE DOCUMENT AS A WHOLE, I.E. BUILDING THE
FULL AST OF AN XML DOCUMENT FOR CONVENIENCE OF THE USER.
• SAX PARSERS OPERATE ON EACH PIECE OF THE XML DOCUMENT SEQUENTIALLY,
ISSUING PARSING EVENTS WHILE MAKING SINGLE PASS THROUGH THE INPUT
STREAM..
• SAX PROCESSES DOCUMENTS STATE-INDEPENDENTLY, IN CONTRAST TO DOM
WHICH IS USED FOR STATE-DEPENDENT PROCESSING OF XML DOCUMENTS
• SAX IS AN EVENT-DRIVEN INTERFACE.
• THE PROGRAMMER SPECIFIES AN EVENT THAT MAY HAPPEN AND, IF IT DOES,
SAX GETS CONTROL AND HANDLES THE SITUATION.
WHEN TO USE SAX?
SAX IS USED WHEN:
• THE XML DOCUMENT IS PROCESSED IN A LINEAR FASHION FROM TOP TO
BOTTOM.
• THE DOCUMENT IS NOT DEEPLY ROOTED.
• VERY LARGE XML DOCUMENT IS PROCESSED WHOSE DOM TREE WOULD
CONSUME TOO MUCH MEMORY.
• THE PROBLEM TO BE SOLVED INVOLVES ONLY PART OF THE XML DOCUMENT.
DISADVANTAGES OF SAX
• WE HAVE NO RANDOM ACCESS TO AN XML DOCUMENT SINCE IT IS PROCESSED
IN A FORWARD ONLY MANNER.
• SAX IS READ ONLY PARSER.
FOR MORE DETAIL
PLEASE DO VISIT
• SOURCE::HTTPS://EN.WIKIPEDIA.ORG/WIKI/SIMPLE_API_FOR_XML
 THANK YOU 

More Related Content

What's hot

Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
AakankshaR
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)
Adnan Sohail
 
Asp objects
Asp objectsAsp objects
Asp objects
RajaRajeswari22
 
PHP - Introduction to Object Oriented Programming with PHP
PHP -  Introduction to  Object Oriented Programming with PHPPHP -  Introduction to  Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programming
Filip Ekberg
 
Xml
XmlXml
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
Hassan Dar
 
PHP - Introduction to PHP AJAX
PHP -  Introduction to PHP AJAXPHP -  Introduction to PHP AJAX
PHP - Introduction to PHP AJAX
Vibrant Technologies & Computers
 
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
Bharat_Kumawat
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
WebStackAcademy
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
balamurugan.k Kalibalamurugan
 
Java script arrays
Java script arraysJava script arrays
Java script arrays
Frayosh Wadia
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themes
Sourabh Sahu
 
Document Type Definition (DTD)
Document Type Definition (DTD)Document Type Definition (DTD)
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
WebStackAcademy
 

What's hot (20)

Sgml
SgmlSgml
Sgml
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)
 
Asp objects
Asp objectsAsp objects
Asp objects
 
PHP - Introduction to Object Oriented Programming with PHP
PHP -  Introduction to  Object Oriented Programming with PHPPHP -  Introduction to  Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programming
 
Xml
XmlXml
Xml
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
PHP - Introduction to PHP AJAX
PHP -  Introduction to PHP AJAXPHP -  Introduction to PHP AJAX
PHP - Introduction to PHP AJAX
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
Xml http request
Xml http requestXml http request
Xml http request
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
Java script arrays
Java script arraysJava script arrays
Java script arrays
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themes
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Document Type Definition (DTD)
Document Type Definition (DTD)Document Type Definition (DTD)
Document Type Definition (DTD)
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 

Similar to SAX

XML - SAX
XML - SAXXML - SAX
X Usax Pdf
X Usax PdfX Usax Pdf
X Usax Pdf
nit Allahabad
 
Python xml processing
Python   xml processingPython   xml processing
Python xml processing
Learnbay Datascience
 
Understanding Sax
Understanding SaxUnderstanding Sax
Understanding SaxLiquidHub
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
Christoph Santschi
 
Service Oriented Architecture - Unit II - Sax
Service Oriented Architecture - Unit II - Sax Service Oriented Architecture - Unit II - Sax
Service Oriented Architecture - Unit II - Sax
Roselin Mary S
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
JAXP
JAXPJAXP
Xml parsing
Xml parsingXml parsing
Xml parsing
Malintha Adikari
 
Xml serialization
Xml serializationXml serialization
Xml serializationRaghu nath
 
Soa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web servicesSoa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web services
Vaibhav Khanna
 
Amazon Elasticsearch and Databases
Amazon Elasticsearch and DatabasesAmazon Elasticsearch and Databases
Amazon Elasticsearch and Databases
Amazon Web Services
 
Cetpa dotnet taining
Cetpa dotnet tainingCetpa dotnet taining
Cetpa dotnet taining
sharmamohan13989
 

Similar to SAX (20)

XML - SAX
XML - SAXXML - SAX
XML - SAX
 
X Usax Pdf
X Usax PdfX Usax Pdf
X Usax Pdf
 
Unit 2.3
Unit 2.3Unit 2.3
Unit 2.3
 
Unit 2.3
Unit 2.3Unit 2.3
Unit 2.3
 
Python xml processing
Python   xml processingPython   xml processing
Python xml processing
 
Understanding Sax
Understanding SaxUnderstanding Sax
Understanding Sax
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
 
Service Oriented Architecture - Unit II - Sax
Service Oriented Architecture - Unit II - Sax Service Oriented Architecture - Unit II - Sax
Service Oriented Architecture - Unit II - Sax
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
JAXP
JAXPJAXP
JAXP
 
XML
XMLXML
XML
 
Introduction to AJAX
Introduction to AJAXIntroduction to AJAX
Introduction to AJAX
 
Xml3
Xml3Xml3
Xml3
 
Xml3
Xml3Xml3
Xml3
 
Xml parsing
Xml parsingXml parsing
Xml parsing
 
Xml serialization
Xml serializationXml serialization
Xml serialization
 
Soa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web servicesSoa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web services
 
Amazon Elasticsearch and Databases
Amazon Elasticsearch and DatabasesAmazon Elasticsearch and Databases
Amazon Elasticsearch and Databases
 
Cetpa dotnet taining
Cetpa dotnet tainingCetpa dotnet taining
Cetpa dotnet taining
 
XMl
XMlXMl
XMl
 

More from Tilakpoudel2

Motivation in software project development
Motivation in software project developmentMotivation in software project development
Motivation in software project development
Tilakpoudel2
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphs
Tilakpoudel2
 
Advantages and disadvantages of Simulation
Advantages and disadvantages of SimulationAdvantages and disadvantages of Simulation
Advantages and disadvantages of Simulation
Tilakpoudel2
 
Output analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial BiasOutput analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial Bias
Tilakpoudel2
 
Expert system
Expert systemExpert system
Expert system
Tilakpoudel2
 
Markov chain and its Application
Markov chain and its Application Markov chain and its Application
Markov chain and its Application
Tilakpoudel2
 

More from Tilakpoudel2 (6)

Motivation in software project development
Motivation in software project developmentMotivation in software project development
Motivation in software project development
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphs
 
Advantages and disadvantages of Simulation
Advantages and disadvantages of SimulationAdvantages and disadvantages of Simulation
Advantages and disadvantages of Simulation
 
Output analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial BiasOutput analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial Bias
 
Expert system
Expert systemExpert system
Expert system
 
Markov chain and its Application
Markov chain and its Application Markov chain and its Application
Markov chain and its Application
 

Recently uploaded

Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 

Recently uploaded (20)

Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 

SAX

  • 1. SAX (SIMPLE API FOR XML) PRESENTED BY: TILAK POUDEL NEPATHYA COLLEGE 6TH SEMESTER
  • 2. SAX (SIMPLE API FOR XML) • INTRIODUCTION: • SAX (SIMPLE API FOR XML) IS AN EVENT-DRIVEN ONLINE ALGORITHM FOR PARSING XML DOCUMENTS, WITH AN API DEVELOPED BY THE XML-DEV MAILING LIST. • SAX PROVIDES A MECHANISM FOR READING DATA FROM AN XML DOCUMENT THAT IS AN ALTERNATIVE TO THAT PROVIDED BY THE DOCUMENT OBJECT MODEL (DOM). • SAX GENERETES NO PARSE TREE
  • 3. SAX (SIMPLE API FOR XML) • WHERE THE DOM OPERATES ON THE DOCUMENT AS A WHOLE, I.E. BUILDING THE FULL AST OF AN XML DOCUMENT FOR CONVENIENCE OF THE USER. • SAX PARSERS OPERATE ON EACH PIECE OF THE XML DOCUMENT SEQUENTIALLY, ISSUING PARSING EVENTS WHILE MAKING SINGLE PASS THROUGH THE INPUT STREAM..
  • 4. • SAX PROCESSES DOCUMENTS STATE-INDEPENDENTLY, IN CONTRAST TO DOM WHICH IS USED FOR STATE-DEPENDENT PROCESSING OF XML DOCUMENTS • SAX IS AN EVENT-DRIVEN INTERFACE. • THE PROGRAMMER SPECIFIES AN EVENT THAT MAY HAPPEN AND, IF IT DOES, SAX GETS CONTROL AND HANDLES THE SITUATION.
  • 5. WHEN TO USE SAX? SAX IS USED WHEN: • THE XML DOCUMENT IS PROCESSED IN A LINEAR FASHION FROM TOP TO BOTTOM. • THE DOCUMENT IS NOT DEEPLY ROOTED. • VERY LARGE XML DOCUMENT IS PROCESSED WHOSE DOM TREE WOULD CONSUME TOO MUCH MEMORY. • THE PROBLEM TO BE SOLVED INVOLVES ONLY PART OF THE XML DOCUMENT.
  • 6.
  • 7. DISADVANTAGES OF SAX • WE HAVE NO RANDOM ACCESS TO AN XML DOCUMENT SINCE IT IS PROCESSED IN A FORWARD ONLY MANNER. • SAX IS READ ONLY PARSER.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. FOR MORE DETAIL PLEASE DO VISIT • SOURCE::HTTPS://EN.WIKIPEDIA.ORG/WIKI/SIMPLE_API_FOR_XML