DOM Level 1

The main part of the DOM API Level 1 is a set of core interfaces, which is a must for any DOM API implementation. The core interfaces contain methods useful for any type of tree-structured document as well as some XML-specific extensions.

In addition to core interfaces, the specification defines an API for accessing HTML document trees.

DOM Level 1 Core

The DOM Level 1 Core Interfaces Specification defines two types of interfaces:

  • Fundamental— Ones that should be realized in any DOM Level 1–compliant implementation.

  • Extended— Interfaces that are not required in some implementations—for example, in HTML-only implementations of DOM Level 1.

The W3C specification of DOM gives Interface Definition Language (IDL) definitions of interfaces that provide implementation-neutral and language-independent means to define them. All the interfaces could be easily defined and implemented in any language that supports interface definitions, such as Java.

The interfaces are defined in such a way that they are easy to use in any object-oriented language, such as Java, C++, and so on, or platform, such as DCOM.

However, for performance-critical applications as well as for easy access from non–Object-Oriented languages, such as C, there is one interface defined (see the following Node interface definition) that has a lot of functionality available in it. For the price of code readability through this interface, XML documents can be performance-efficiently accessed without querying other interfaces.

Let's look more closely at the DOM Level 1 Fundamental Core Interfaces.

Fundamental Core Interfaces

The Document Object Model defines a document as a tree hierarchy of Nodes. A node can have other nodes as children or it can be a leaf, so it cannot have children. A Node represents any element of the XML document tree hierarchy. An element, such as <author>, is a node. An element with an attribute, such as <author ID="1234567">, is a node as well.

The DOM operates with the following types of nodes:

  • Document

  • Document Type

  • DocumentFragment

  • Notation

  • Element

  • Attribute

  • Text

  • CDATA Section

  • Entity

  • Entity Reference

  • Processing Instruction

  • Comment

Each of them has its own interface derived from the base interface Node.

There are also two interfaces defined in the specification that do not belong to the html or xml document model but are used to provide the developers with some helper functionality. These interfaces are the DOMImplementation and DOMException.

DOMImplementation

The DOMImplementation interface defines only one method, hasFeature, which is a helper function provided for the purpose of testing whether the requested feature and its version are supported by the implementation of DOM Level 1 used by a developer.

The method takes two DOMStrings: the XML name of a feature to test and the version of the feature.

Note

The DOMString is a sequence of characters encoded using UTF-16 encoding. In Java, it corresponds to the String class.


As we mentioned before, the DOM level 1 consists of two modules: XML and HTML; hence, the two feature names defined in the specification are XML and HTML.

DOMException

There is only one exception interface defined in DOM. Any exceptions or errors related to the operation of the DOM implementation should be encapsulated into the implementation of this class. At the time this book was being written, there were 10 exception codes defined and the W3C reserves the right to use other codes in the future. Table 14.1 lists the exception codes.

Table 14.1. Exception Codes Defined in the DOMException Interface
Exception Code Description
DOMSTRING_SIZE_ERR The exception is raised if the text string size does not fit into a DOMString.
HIERARCHY_REQUEST_ERR This condition happens when the operation on the node (insert, replace, and so on) cannot be done because of the hierarchy restrictions: an attempt to insert a child into a node that cannot have children, or an attempt to insert into a nonexisting parent note.
INDEX_SIZE_ERR The code means that the operation failed because the index or size was outside the range of acceptable values.
INUSE_ATTRIBUTE_ERR The exception is raised when there is an attempt made to add or replace an attribute that is already in use.
INVALID_CHARACTER_ERR An operation failed because of an illegal character in a name or other property.
NOT_FOUND_ERR An operation on the node failed because the node does not exist.
NOT_SUPPORTED_ERR This exception is raised when the implementation of the DOM does not support the requested operation or object.
NO_DATA_ALLOWED_ERR This code means that the node type does not support the data specified.
NO_MODIFICATION_ALLOWED_ERR An operation failed because of an attempt to modify something that is not allowed to be changed.
WRONG_DOCUMENT_ERR This code is raised when an attempt is made to use a node within a document it doesn't belong to.

Node

The XML or HTML document can be built from different types of nodes, such as Element, CDATA Section, Comment, and so on. All of them have their own interfaces and specific methods defined in DOM Level 1. These interfaces are inherited from Node, which defines basic properties and methods independent from the node type.

The Node interface defines a set of basic methods that provide access to node elements and their children. Together with the Node properties, which will be discussed later, these methods are the minimum you need to work with XML or HTML documents. The methods are described in Table 14.2.

Table 14.2. Methods of the Node Interface
Name Parameters Description, Returns, Throws
insertBefore

newChild— Node. A node to insert

refChild Node. The child node before which the new one should be inserted.

Description

Inserts the newChild node before the existing refChild. If refChild already exists, it is replaced by the new instance.

Return value

Node— The inserted node

Exception

Throws DOMException:
HIERARCHY_REQUEST_ERR
WRONG_DOCUMENT_ERR
NO_MODIFICATION_ALLOWED_ERR
NOT_FOUND_ERR

replaceChild

newChild— Node. A node to replace with.

oldChild Node. An old child node, which should be replaced.

Replaces one node with another. If the newChild node already exists, it is replaced.

Returns:

Node— The oldChild node.

Throws DOMException:
HIERARCHY_REQUEST_ERR
WRONG_DOCUMENT_ERR
NO_MODIFICATION_ALLOWED_ERR
NOT_FOUND_ERR

removeChild

oldChildNode. A child node to remove.

Removes a child node from the tree.

Returns:

Node— The oldChild node.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
NOT_FOUND_ERR

appendChild

newChild Node. A node to append.

Appends a new node to the end of the list of children of this node. The methods removes newChild from the tree if it already exists.

Returns:

Node— The inserted node.

Throws DOMException:
HIERARCHY_REQUEST_ERR
WRONG_DOCUMENT_ERR
NO_MODIFICATION_ALLOWED_ERR

HasChildNodes- Boolean None Returns a value that indicates whether the node has children.

Returns:

boolean— True if there are child nodes, false otherwise.

Throws:

No exceptions.
cloneNode

deep boolean. Whether to recursively clone the subtree.

Creates a clone of the node. The created clone will have no parent. If the deep is true, this method will create a clone that includes all of the subnodes, also.

Returns:

Node— The newly created clone.

Throws DOMException:
NOT_SUPPORTED_ERR


Among its properties, the Node interface has four that give enough information to describe the node without obtaining specialized interfaces. Table 14.3 describes these properties.

Table 14.3. Four Properties Describing the Type and Contents of the Node
Name, Type Description Comment
nodeType, readonly unsigned short This property describes the node type, which can be used to make a decision regarding further processing of the node. One of the following constants:

ELEMENT_NODE— The node object represents an Element.

ATTRIBUTE_NODE— The node is an Attribute.

TEXT_NODE— This node is a Text.

CDATA_SECTION_NODE— The node object represents a CDATASection.

ENTITY_REFERENCE_NODE— This is an EntityReference.

ENTITY_NODE— The object is an Entity

PROCESSING_INSTRUCTION_NODE— This is a ProcessingInstruction.

COMMENT_NODE— The node represents a Comment.

DOCUMENT_NODE— This node is a Document.

DOCUMENT _TYPE_NODE This node is a DocumentType.

DOCUMENT_FRAGMENT_NODE— This is a DocumentFragment.

NOTATION_NODE— The node object represents a Notation.

nodeName, readonly DOMString The name of the node. The value of this property depends on the nodeType. Refer to Table 14.2 for details.
nodeValue, read-write DOMString The value of the node. The value of this property depends on the nodeType. Refer to Table 14.2 for details.
attributes, readonly NamedNodeMap Attributes of the node. This property contains all the attributes of the node of type Element or null for all the other node types.

Depending on the value of the nodeType property, three of the properties described have different meanings as shown in Table 14.4.

Table 14.4. Values of the nodeName, nodeValue, and attributes Properties Depending on the nodeType
Node Type nodeName nodeValue............Attributes
ELEMENT_NODE The name of the element tag. null………………All the element attributes.
ATTRIBUTE_NODE The name of the attribute. The value of the attribute….null
TEXT_NODE The string literal “#text”. The content of the node……null
CDATA_SECTION_NODE The string literal “#cdata-section”. The content of ………………..null the CDATA section node.
ENTITY_REFERENCE_NODE The name of the entity referenced. null…………………………………null
ENTITY_NODE The name of the entity. null…………………………………null
PROCESSING_INSTRUCTION_NODE The target of the processing instruction. The remaining …………………null content of the processing instruction excluding the target.
COMMENT_NODE The string literal “#comment”. The contents of the ………….null comment.
DOCUMENT_NODE The string literal “#document”. null…………………………………null
DOCUMENT_TYPE_NODE The document type name. null…………………………………null
DOCUMENT_FRAGMENT_NODE The string literal “#document fragment”. null…………………………………null
NOTATION_NODE The notation name. null…………………………………null

These are not the only properties defined in the Node interface. Table 14.5 describes the remainder.

Table 14.5. Other Properties Defined in the Node Interface
Name, Type Description Comment
parentNode, readonly Node The parent of the node. Null if: The node has not been added to a tree yet (just created) or, The node has been removed from the tree or, The node represents Attr, Document, DocumentFragment, Entity, and Notation.
childNodes, readonly NodeList All the children of the node. Empty NodeList if there are no children (not null!).
firstChild, readonly Node The first child of the node. Null if there are no children in the node.
lastChild, readonly Node The last child of the node. Null if there are no children in the node.
previousSibling, readonly Node The node preceding this one under the same parent node in the document. Null if there are no preceding node or if the node is the root of the document.
nextSibling, readonly Node The node that follows this one under the same parent node in the document. Null if there is no following node or if the node is the root of the document.
ownerDocument, readonly Document The Document object which owns the node. Null if the node is a Document.

NodeList

In many cases, a developer needs to get a collection of the children that belong to a node and iterate through them using an index. Such a collection is accessible in DOM Level 1 from the NodeList interface, which has one method and one property in it as shown in Tables 14.6 and 14.7 respectively.

Table 14.6. Method of the NodeList Interface
Name Parameters Description, Returns, Throws
item indexunsigned long. Returns a node by its index in the collection. The first node has an index of 0.

Throws:

No exceptions.

Table 14.7. Property of the NodeList Interface
Name, Type Description Comment
length, readonly unsigned long The number of nodes in the collection.  

NamedNodeMap

The NamedNodeMap interface is another way of accessing a node's children. Unlike NodeList, this interface allows us to access nodes by their names.

In addition to item method and length property, which are the same as in NodeList, there are three more methods defined in the NamedNodeMap.

Table 14.8. Methods of the NamedNodeMap Interface
Name Parameters Description, Returns, Throws
GetNamedItem

nodeName— DOMString. The name of the node to retrieve.

The method searches for a node by its name—specified as a parameter.

Returns:

Node— The node found or null.

Throws:

No exceptions.
SetNamedItem

newNode— Node. The node to add to the collection.

Adds a new node to the collection. The node's nodeName property is then used as the node's name in the map.

Returns:

null or the previous node if the operation results in replacement of a node with the same name.

Throws DOMException:
INUSE_ATTRIBUTE_ERR
WRONG_DOCUMENT_ERR
NO_MODIFICATION_ALLOWED_ERR

removeNamedItem

nodeName— Node. The name of the node to remove.

The method searches for a node by its name, specified as a parameter, and removes the node.

Returns:

Node— The node removed or null if the node cannot be found.

Throws DOMException:
NOT_FOUND_ERRNO_MODIFICATION_ALLOWED_ERR

item

index— unsigned long.

Returns a node by its index in the collection. The first node has an index of 0. If the index is out of range, the method returns null.

Throws:

No exceptions.

Table 14.9. Property of the NamedNodeMap Interface
Name, Type Description Comment
length, readonly unsigned long The number of nodes in the collection.  

Document

The Document object is the root node of an XML document tree and any node object, other than the root, created using a DOM API implementation, should have an owner document. The Document interface inherits the Node interface. In addition to the methods and properties defined in the Node, it provides a set of factory methods to create any other types of Node objects, such as Elements, Processing Instructions, and so on.

Table 14.10. Methods of the Document Interface
Name Parameters Description, Returns, Throws
CreateElement

tagName— DOMString. The name of the element to create.

Creates a new node of type Element with a tag name specified in the parameter. The newly created element should then be attached to some node in a document tree with a call to a method such as appendChild().

Returns:

Element— The new Element object created.

Throws DOMException:
INVALID_CHARACTER_ERR
NOT_SUPPORTED_ERR

CreateDocument- Fragment None Creates a new empty DocumentFragment.

Returns:

DocumentFragment— The new DocumentFragment object created.

Throws:

No exceptions.
createTextNode

dataDOMString. The node's text string.

Creates a new Text node and inserts the specified string as its content.

Returns:

Text— The new Text object created.

Throws:

No exceptions.
CreateComment

dataDOMString. The node's comment string.

The node's comment string. Creates a new node of type Comment node and inserts the specified string as its textual content.

Returns:

CommentNode— The new Comment object created.

Throws:

No exceptions.
createCDATASection

dataDOMString. The node's text.

Creates a new CDATASection node and inserts the specified string as its content.

Returns:

Node— The new CDATASection object created.

Throws DOMException:
NOT_SUPPORTED_ERR

createProcessing-Instruction

targetDOMString.

dataDOMString.

Creates a new ProcessingInstruction node with the name and content specified as parameters.

Returns:

Node— The new ProcessingInstruction object created.

Throws DOMException:
NOT_SUPPORTED_ERR
INVALID_CHARACTER_ERR

createAttribute

nameDOMString. The name of the attribute.

Creates a new Attr node using the name specified as a parameter.

Returns:

Attr— The new Attr objectcreated.

Throws DOMException:
INVALID_CHARACTER_ERR

createEntityReference

nameDOMString. The name of the Entity to reference.

Creates a new EntityReference node using the name of the referenced Entity object as a parameter.

Returns:

Entityreference— The new EntityReference object created.

Throws DOMException:
INVALID_CHARACTER_ERR
NOT_SUPPORTED_ERR

getElementsByTagName

tagNameDOMString. The name of a tag to get elements of.

Return a NodeList containing all the Element node objects with the tag name specified—or a list of all of the Elements that belong to a Document if an asterisk is specified as a tag name.

Returns:

NodeList— A list of Elements.

Throws:

No exceptions.

Table 14.11. Properties of the Document Interface
Name, Type Description Comment
docType, readonly DocumentType This property contains a DTD specification of the Document. This property returns null if the document does not have a Document Type Definition associated with it.
implementation, readonly DOMImplementation The DOMImplementation object that can be used to find out about the capabilities of the DOM implementation being used.  
documentElement, readonly Element An instance of the root Element of the document tree.  

DocumentFragment

The DocumentFragment interface represents a section of the XML or HTML document tree. It is derived from the Node interface and it is a node containing a fragment of a bigger document. It is a very useful lightweight version of the Document interface especially dedicated to perform temporary operations such as holding a portion of a tree that is being moved from one location to another, and so on. For example, you can create a DocumentFragment using the factory method createDocumentFragment() on the Document interface, assemble a subtree attaching child nodes with calls to the appendChild() method on the DocumentFragment interface, and then place the fragment in another location in the document.

The DocumentFragment interface does not have any methods or properties other than those defined within the Node interface.

Element

The Element interface represents an XML or HTML document Element.

It inherits all the methods of the Node interface and introduces a bit more flexibility in accessing elements' attributes.

Table 14.12. Methods of the Element Interface
Name Parameters Description, Returns, Throws
getAttribute

nameDOMString. The name of the element attribute to get.

The method returns the value of the requested attribute.

Returns:

DOMString— A value of the attribute or null if there is no specified or default value.

Throws:

No exceptions.
setAttribute

nameDOMString. The name of the element attribute to set.

valueDOMString. The value of the attribute.

Adds a new attribute with the name and value specified to the element node.

Changes the value of the attribute with the same name if it already exists.

Returns:

No return value.

Throws DOMException:
INVALID_CHARACTER_ERR
NO_MODIFICATION_ALLOWED_ERR

removeAttribute

nameDOMString. The name of the element attribute to remove.

Removes the attribute specified from the element node

or

changes the value of the attribute to default if a default value exists for this attribute.

Returns:

No return value.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR

getAttributeNode

nameDOMString. The name of the element attribute to set.

Unlike the getAttribute this method returns the Node object associated with the requested attribute rather than the attribute string value.

Returns:

Attr— An object of type Attr or null if the attribute does not exist.

Throws:

No exceptions.
setAttributeNode

newAttrAttr. An Attr to add to an element.

Adds a new attribute to the element node.

Replaces the attribute with the same name if it already exists.

Returns:

AttrThe old attribute object if the method replaced it or null otherwise.

Throws DOMException:
WRONG_DOCUMENT_ERR
NO_MODIFICATION_ALLOWED_ERR
INUSE_ATTRIBUTE_ERR

removeAttributeNode

oldAttrAttr. The attribute to remove.

Removes the attribute specified from the element node

or

changes the value of the attribute to the default if the default value exists for this attribute

Returns:

Attr— The attribute object removed.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
NOT_FOUND_ERR

getElementsByTagName

nameDOMString. The name used to match descendant element names.

Returns a NodeList collection of all the descendant elements whose name matches the one given in the parameter. If the special character * is used, all element descendants will be returned.

Returns:

NodeList— A collection of Element nodes.

Throws:

No exceptions.
normalize None The method parses a subtree below the Element node and concatenates all the Text nodes that do not have any markup between each other.This is useful when you need to make sure the DOM tree structure is the same after the document has been saved to a file and loaded again.

Returns:

No return value.

Throws:

No exceptions.

Table 14.13. Properties of the Element Interface
Name, Type Description Comment
tagName, readonly DOMString The name of an XML or HTML tag—that is, the element name. Note that for XML documents the cproperty is in the same case as it is in the document. For HTML documents the property contains a canonical uppercase tag name.

Attr

The Attr object is a very special kind of node object. It is a property of an element node and is not treated by the DOM as a child of the element or as a part of the document tree.

Table 14.14. Properties of the Attr Interface
Name, Type Description Comment
name, readonly DOMString The name of the attribute.  
value, readonly DOMString The value of the attribute.  
specified, readonly boolean This property indicates whether the attribute has been explicitly set by a user or taken by the DOM from the DTD. True if the attribute has been assigned a value by a user through DOM or false if the default attribute value has been used based on the document's DTD, which is accessible through the DocumentType interface.

CharacterData

The CharacterData interface is derived from Node, also. In addition to the basic methods and properties provided by its parent, it has a set of methods and properties that can be used to access or manipulate character data within the XML document.

In DOM Level 1, the CharacterData is a base interface for the following interfaces:

  • Text

  • Comment

Table 14.15. Methods of the CharacterData Interface
Name Parameters Description, Returns, Throws
substringData

offset unsigned long. The starting position within the node's character data of the substring to retrieve.

count— unsigned long. The size of the substring to retrieve.

Retrieves a range of data from the node's character data.

Returns:

DOMString— The substring retrieved.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
INDEX_SIZE_ERR

appendData

argDOMString. The string to append to the end of the node's character data

Appends a string to the node's character data.

Returns:

No return value.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR

insertData

offset— unsigned long. The starting position within the node's character data, where the data will be inserted.

argDOMString. The substring to insert.

Inserts data into the node's character data at the specified offset.

Returns:

No return value.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
INDEX_SIZE_ERR

deleteData

offset— unsigned long. The offset within the node's character data of the substring to delete.

count— unsigned long. The number of characters to delete.

Deletes a substring from the node's character data at the specified offset.

Returns:

No return value.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
INDEX_SIZE_ERR

replaceData

offset— unsigned long. The offset of the substring to replace.

count— unsigned long. The number of characters to replace.

argDOMString. The substring to replace with.

Replaces a substring in the node's character data at the specified off-set

Returns:

No return value.

Throws DOMException:
NO_MODIFICATION_ALLOWED_ERR
INDEX_SIZE_ERR


Table 14.16. Properties of the CharacterData Interface
Name, Type Description Comment
data, DOMString. The character data of the node. Reading the value may throw DOMException: DOMSTRING_SIZE_ERR Setting the value may throw DOMException:
NO_MODIFICATION_ALLOWED_ERR

length, readonly unsigned long. Length of the character data of the node.  

Text

The Text interface is derived from CharacterData and should implement all the methods defined in its parent. In addition to the base methods, there is one more defined in the Text (see Table 14.17).

Nodes of type Text represent the text data of an Element or Attr node. Note that the DOM specification allows an element to have multiple adjacent Text nodes as its children (for example, as a result of calling the splitText() method on a Text node). However, XML does not have any means of storing adjacent Text nodes persistently and adjacent Text nodes will become a single node after the document has been saved and reloaded.

Table 14.17. Methods of the Text Interface
Name Parameters Description, Returns, Throws
splitText

offset— unsigned long. Offset in the Text node where node will be split.

Splits a Text node into two separate nodes. After a successful call, the text in this node contains the first part of the text before a split point.

Returns:

Text— The new Text node containing the second part of the text.

Throws DOMException:
INDEX_SIZE_ERR
NO_MODIFICATION_ALLOWED_ERR


Comment

The comment interface inherits the CharacterData interface and does not implement any additional methods.

Comment nodes represent comment sections of XML and HTML documents enclosed in <!-- and --> tags.

Extended Interfaces

The interfaces discussed in the previous section are required for any implementation of the DOM Level 1 API. However, the specification also defines a set of extended interfaces that are only mandatory for implementations supporting XML. If an implementation is to be used only with HTML documents, there is no need to support any of the extended interfaces.

Note

To find out whether an implementation supports extended interfaces, you can use the hasFeature() method passing it two DOMStrings: "XML" and "1.0" as parameters. If the return value is true then the extended interfaces are present.


DocumentType

The document type interface provides a set of methods to access a list of entities and notations from the document, such as entities declared in the DTD for an XML document.

In future versions of DOM when the W3C standardization efforts produce some final specifications for XML Schemas and DTDs, this interface may be extended to give DOM implementations more flexibility to provide validation of documents, strong type checking, and so on.

At the date of this writing, there are only three properties defined in the interface:

Table 14.18. Properties of the DocumentType Interface
Name, Type Description Comment
name, readonly DOMString The name of the XML Schema or DTD associated with the dcument.  
entities, readonly NamedNodeMap A NamedNodeMap of Entity objects declared in the DTD.  
notations, readonly NamedNodeMap A NamedNodeMap of Notation objects declared in the DTD.  

Notation

The Notation interface, derived from the Node interface, describes the notation declared in the DTD.

Table 14.19. Properties of the Notation Interface
Name, Type Description Comment
publicId, readonly DOMString The notation's public identifier. The value is null if the id is missing.
systemId, readonly DOMString The notation's system identifier. The value is null if the id is missing.

Entity

Like many others, the Entity interface is derived from the Node interface. It describes an entity defined in a document. However, it's a special kind of node, which does not belong to any parent—it's rather a property of the document than a part of the document tree.

The specification leaves it up to the XML processor implementer to decide whether it should perform the validation of documents. Consequently, any entities may be expanded by the processor before the document structure is exposed as a DOM tree.

Table 14.20. Properties of the Entity Interface
Name, Type Description Comment
publicId, readonly DOMString The entity's public identifier. The value is null if the id is missing.
systemId, readonly DOMString The entity's system identifier. The value is null if the id is missing.
notationName, readonly DOMString The name of the notation used for entity. The value is null if the entity is a parsed entity.

EntityReference

When an XML processor parses a document, it can use objects of type EntityReference to hold references to any entities found in that document. However, the specification allows parsers to resolve any entities and perform all necessary substitutions in the document tree instead of building up EntityReference objects.

The EntityReference interface is declared as an empty interface derived from the Node; therefore, it implements only the methods and properties defined in its parent interface.

ProcessingInstruction

When a DOM parser encounters a processing instruction in the document being parsed, it creates and populates an object which implements the ProcessingInstruction interface derived from the Node interface. A processing instruction consists of the specification of its target and data associated with it.

Table 14.21. Properties of the ProcessingInstruction Interface
Name, Type Description Comment
target, readonly DOMString The target of the instruction.  
data, DOMString The data associated with the instruction. This property is writable; however, if the node is not allowed to be modified, updating the property may throw DOMException:
NO_MODIFICATION_ALLOWED_ERR


CDATASection

The last, but not least, of the XML-specific interfaces of the DOM Level 1 is the CDATASection. Objects implementing this interface correspond to CDATA sections in the XML documents—special placeholders for text that may confuse parsers and therefore should not be parsed.

CDATASection interface inherits the Text interface. Objects of type CDATASection are usually treated in exactly the same way as Text objects so that there is no need to have any additional methods or properties implemented in the CDATASection interface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.88.7