Question
need some help answering these questions :) 1.Explain the differences between parsing an XML document using a DOM parser and using a SAX parser. Discuss
need some help answering these questions :)
1.Explain the differences between parsing an XML document using a DOM parser and using a SAX parser. Discuss the positive and negative aspects of each. For each of the two types of parsing (i.e., DOM and SAX), give an example of a situation where that type of parsing (i.e., DOM or SAX) would be the best one to use.
(This question is meant to require a short, 2-3 sentence, answer.)
2.Which interface must the class that handles XML SAX parsing events implement?
a)ActionListener
b)ActionHandler
c)EventHandler
d)ContentHandler
e)None of these
3.Assuming default behavior of Java's XML parsing (i.e., no special options are given to constructors, no method calls are made to modify behavior, and the parser is not in validating mode), identify each of the children that would be parsed from the following XML fragment.
Feel free to consult the XML DOM example which was reviewed in class for additional details on how an XML document like this would be parsed.
4.Explain each part of this DTD line:
5.Describe the difference in how XML data are accessed in a Document object (i.e., DOM-parsed) and via XPath. For example, describe how you would obtain the data item contained by a specific element in each case and what steps you would have to take or what knowledge would be required in each instance.
(This is meant to require a thorough, 1-2 paragraph, answer.)
6.Which of the four JDBC driver types is best? Why?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started