Question

What are the two basic XML parsing models? Describe how they are different from each other...

What are the two basic XML parsing models? Describe how they are different from each other and when each might be used.

Homework Answers

Answer #1

There are two basic types of XML parsing models-
1) DOM (Document Object Model)
DOM is a tree-based model that creates an internal strcuture of the XML document as a tree of nodes. This tree can be searched for nodes, and these nodes can be read and updated by the client application.
DOM model is generally used for small documents, because it is memory inefficient, since it uses up more memory for loading whole XML document into memory.
DOM models are commonly used for browsers, editors etc.
2) SAX (Simple API for XML)
SAX is an event-driven model. It doesn't create any internal structure of the XML. Instead, an event-based API sends parsing events directly to the client application through callbacks, and the application implements handlers to deal with the different events. In SAX, it is not possible to navigate through the document like with a DOM model. Also, SAX is read only i.e. can’t insert or delete data.
SAX models are generally used for large documents as they memory efficient (uses up no extra memory to store XML document content) as comapred to DOM models.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Compare the elements of the basic Software Development Life Cycle with 2 other models. How are...
Compare the elements of the basic Software Development Life Cycle with 2 other models. How are they similar? How are they different?
Describe the PPP and PFI financing models and how they work. Compare the two models.
Describe the PPP and PFI financing models and how they work. Compare the two models.
describe how the constitutive view of Organizational Communication is different from the views of the other...
describe how the constitutive view of Organizational Communication is different from the views of the other perspectives.
1. please describe the Application Security Models 2. What are the three basic states of data?...
1. please describe the Application Security Models 2. What are the three basic states of data? 3. With regards to security, where should we spend the most effort?
A company sells two models of a product—basic and premium. The basic model has a variable...
A company sells two models of a product—basic and premium. The basic model has a variable cost of $75 and sells for $100. The premium model has a variable cost of $100 and sells for $150. Fixed costs are $15,000. If the company usually sells 5,000 basic models and 2,500 premium models, then the break-even point in composite units is _________ units. What are the steps
short answer: Explain what instrumental leadership is. How is this different from expressive leadership? Define two...
short answer: Explain what instrumental leadership is. How is this different from expressive leadership? Define two of the three leadership styles and give a brief description of each. What does the research by Solomon Asch and Stanley Milgram show us about the ability of social groups to affect the opinions and behavior of group members? What is the meaning of "in-group" and "out-group?" How do they both affect the opinions and behavior of individuals? List two of the six traits...
How are the MPC and the multiplier different from and similar to each other?
How are the MPC and the multiplier different from and similar to each other?
In what ways are motivation and emotion similar to each other and different from each other?
In what ways are motivation and emotion similar to each other and different from each other?
How are functional medicine models of integrative care different from models that add CAM therapies into...
How are functional medicine models of integrative care different from models that add CAM therapies into current healthcare systems?
Noland Company manufactures two models of its banjo, the Basic and the Luxury. The Basic model...
Noland Company manufactures two models of its banjo, the Basic and the Luxury. The Basic model requires 10000 direct labor hours and the Luxury requires 30000 direct labor hours. The company produces 3400 units of the Basic model and 600 units of the Luxury model each year. The company inspects one Basic for every 100 produced, and inspects one Luxury for every 10 produced. The company expects to incur $1457000 of total inspecting costs this year. How much of the...