Explain different types of XML Application Programming Interface (API).
The following are two main parts of XML parsers:
Tree-based API - Compiles an XML document into a tree structure and loads it into memory. You can traverse and alter the tree structure. The DOM is an example of a tree-based API.
Event-based API - gives the report to an application about the parsing events by a set of built-in callback functions. An example of the event-based API is SAX.