Implementation vs Interface
The discussion so far has focused on DOM Level 2 core functionality. The DOM working group defines a base set of functionality that all implementations must fulfill. The DOM working group has also defined interfaces that model peripheral functionality that implementations can elect to implement or not implement as they see fit. Rather than use the well-known component development techniques[11] for interface discovery, the DOM working group instead relies on a hard-coded method (DOMImplementation.hasFeature) to determine whether a given implementation supports some feature. DOMImplementation.hasFeature allows you to query for specific versions of DOM feature support. The following Java code tests if the DOM implementation ...
Get Essential XML: Beyond Markup now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.