This section summarizes the changes between [DOM Level 2 Core] and this new version of the Core specification.
The following new sections have been added:
DOMConfiguration;
AttrAttr interface has two new attributes,
Attr.schemaTypeInfo, and
Attr.isId.DocumentDocument interface has seven new
attributes: Document.inputEncoding,
Document.xmlEncoding,
Document.xmlStandalone,
Document.xmlVersion,
Document.strictErrorChecking,
Document.documentURI, and
Document.domConfig. It has three new methods:
Document.adoptNode(source),
Document.normalizeDocument(), and
Document.renameNode(n, namespaceURI,
qualifiedName). The attribute
Document.doctype has been modified.
DOMExceptionDOMException has two new exception codes:
VALIDATION_ERR and
TYPE_MISMATCH_ERR.
DOMImplementationDOMImplementation interface has one new
method, DOMImplementation.getFeature(feature,
version).EntityEntity interface has three new
attributes: Entity.inputEncoding,
Entity.xmlEncoding, and
Entity.xmlVersion.
ElementElement interface has one new attribute,
Element.schemaTypeInfo, and three new methods:
Element.setIdAttribute(name, isId),
Element.setIdAttributeNS(namespaceURI, localName,
isId), and Element.setIdAttributeNode(idAttr,
isId).
NodeNode interface has two new attributes,
Node.baseURI and Node.textContent.
It has nine new methods:
Node.compareDocumentPosition(other),
Node.isSameNode(other),
Node.lookupPrefix(namespaceURI),
Node.isDefaultNamespace(namespaceURI),
Node.lookupNamespaceURI(prefix),
Node.isEqualNode(arg),
Node.getFeature(feature, version),
Node.setUserData(key, data, handler),
Node.getUserData(key). It introduced 6 new
constants: Node.DOCUMENT_POSITION_DISCONNECTED,
Node.DOCUMENT_POSITION_PRECEDING,
Node.DOCUMENT_POSITION_FOLLOWING,
Node.DOCUMENT_POSITION_CONTAINS,
Node.DOCUMENT_POSITION_CONTAINED_BY, and
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC. The
methods Node.insertBefore(newChild, refChild),
Node.replaceChild(newChild, oldChild) and
Node.removeChild(oldChild) have been modified.
TextText interface has two new attributes,
Text.wholeText and
Text.isElementContentWhitespace, and one new
method, Text.replaceWholeText(content).
Document.xmlVersion.
DOMUserDataDOMUserData type was added to the Core
module.DOMObjectDOMObject type was added to the Core
module.DOMStringListDOMStringList interface has one
attribute, DOMStringList.length, and one
method, DOMStringList.item(index).
NameListNameList interface has one attribute,
NameList.length, and two methods,
NameList.getName(index) and
NameList.getNamespaceURI(index).
DOMImplementationListDOMImplementationList interface has one
attribute, DOMImplementationList.length, and
one method,
DOMImplementationList.item(index).
DOMImplementationSourceDOMImplementationSource interface has two
methods,
DOMImplementationSource.getDOMImplementation(features),
and
DOMImplementationSource.getDOMImplementationList(features).
TypeInfoTypeInfo interface has two attributes,
TypeInfo.typeName, and
TypeInfo.typeNamespace.
UserDataHandlerUserDataHandler interface has one method,
UserDataHandler.handle(operation, key, data, src,
dst), and four constants:
UserDataHandler.NODE_CLONED,
UserDataHandler.NODE_IMPORTED,
UserDataHandler.NODE_DELETED, and
UserDataHandler.NODE_RENAMED.
DOMErrorDOMError interface has six attributes:
DOMError.severity,
DOMError.message,
DOMError.type,
DOMError.relatedException,
DOMError.relatedData, and
DOMError.location. It has four constants:
DOMError.SEVERITY_WARNING,
DOMError.SEVERITY_ERROR, and
DOMError.SEVERITY_FATAL_ERROR.
DOMErrorHandlerDOMErrorHandler interface has one method:
DOMErrorHandler.handleError(error).
DOMLocatorDOMLocator interface has seven attributes:
DOMLocator.lineNumber,
DOMLocator.columnNumber,
DOMLocator.byteOffset,
DOMLocator.utf16Offset,
DOMLocator.relatedNode,
DOMLocator.uri, and
DOMLocator.lineNumber.
DOMConfigurationDOMConfiguration interface has one attribute:
DOMConfiguration.parameterNames.
It also has three methods:
DOMConfiguration.setParameter(name, value),
DOMConfiguration.getParameter(name), and
DOMConfiguration.canSetParameter(name,
value).