---
title: "In What scenarios will you use a DOM parser and SAX parser?"  
description: "In What scenarios will you use a DOM parser and SAX parser?"  
author: "Vijay Shukla"  
published: 2013-04-02  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/1701/in-what-scenarios-will-you-use-a-dom-parser-and-sax-parser  
category: "xml"  
tags: ["xml"]  
reading_time: 1 minute  

---

# In What scenarios will you use a DOM parser and SAX parser?

In some scenarios, SAX is easily the better choice for quick, less-intensive parsing and processing. In others, the DOM provides an easy-to-use, clean interface to data in a desirable format. You, the developer, must always analyze your application and its purpose to make the correct decision as to which method to use, or how to use both in concert.

## Answers

### Answer by Vijay Shukla

In some scenarios, SAX is easily the better choice for quick, less-intensive parsing and processing. In others, the DOM provides an easy-to-use, clean interface to data in a desirable format. You, the developer, must always analyze your application and its purpose to make the correct decision as to which method to use, or how to use both in concert.


---

Original Source: https://www.mindstick.com/interview/1701/in-what-scenarios-will-you-use-a-dom-parser-and-sax-parser

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
