Page 121 - DCAP202_Fundamentals of Web Programming
P. 121
Property Description DOM
Returns the Document Type Declaration associated with
Fundamentals of Web Programming 1
doctype
the document
Returns the Document Element of the document (the
documentElement 1
HTML element)
Notes documentURI Sets or returns the location of the document 3
Returns the configuration used when normalize
domConfig 3
Document() is invoked
Returns the DOMImplementation object that handles this
implementation 1
document
inputEncoding Returns the encoding, character set, used for the document 3
strictErrorChecking Sets or returns whether error-checking is enforced or not 3
xmlEncoding Returns the XML encoding of the XML document 3
Sets or returns whether the XML document is standalone
xmlStandalone 3
or not
xmlVersion Sets or returns the XML version of the XML document 3
Document Object Methods
The “DOM” column indicates in which DOM Level the method was introduced.
Method Description DOM
adoptNode(node) Adopts a node from another document to this 3
document. Returns the adopted node
createAttribute() Creates an attribute node 1
createAttributeNS(URI,name) Creates an attribute with the specified name and
2
namspaceURI
createCDATASection() Creates a CDATA node with the specified text.
1
For XML DOM only
createComment() Creates a Comment node with the specified text 1
createDocumentFragment() Creates an empty DocumentFragment node 1
createElement() Creates an Element node 1
createElementNS() Creates an element with the specified namespace 2
createEntityReference() Creates an EntityReference node. For XML DOM
1
only
createProcessingInstruction() Creates an EntityReference node. For XML DOM
1
only
createTextNode() Creates a Text node 1
getElementById() Returns the element that has the ID attribute 2
with the specified value
getElementsByTagName() Returns a NodeList containing all elements with 1
the specified tagname
getElementsByTagNameNS() Returns a NodeList containing all elements with
2
the specified namespaceURI and tagname
importNode() Imports a node from another document 2
normalizeDocument() Removes empty Text nodes, and joins adjacent
3
nodes
renameNode() Renames the specified node
114 LOVELY PROFESSIONAL UNIVERSITY