|
The XML Document Object Model
An Introduction |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
P)
Node Interface
Element
Attr
Text
Comment
Document
DocumentType
Node Interface
insertBefore(newChild:Node, refChild:Node):Node
replaceChild(newChild:Node, oldChild:Node):Node
removeChild(oldChild:Node):Node
appendChild(newChild:Node):Node
hasChildNodes():boolean
nodeType: int
parentNode: Node
childNodes: NodeList
firstChild: Node
lastChild: Node
previousSibling: Node
nextSibling: Node
attributes: NamedNodeMap
NodeList Interface
Node
objects (indexed starting at 0)item(index:unsigned_long): Node
NamedNodeMap Interface
Node objects that can be
accessed by nameNodeList and its
members are not orderedgetNamedItem(name:DOMString): Node
setNamedItem(arg:Node): Node
removeNamedItem(name:DOMString): Node
Attr Interface
Element
Node (i.e., "is a" Node)Node that contains itname: DOMString
specified: boolean (as opposed to a default)value: DOMString
ownerElement: Element
Element Interface
Node
tagName: DOMString
getAttribute(name:DOMString): DOMString
getAttributeNode(name:DOMString): Attr
setAttribute(name:DOMString, value:DOMString): void
setAttribute(attribute:Attr): void
removeAttribute(name:DOMString): void
removeAttribute(attribute:Attr): void
getElementsByTagName(name:DOMString): NodeList
hasAttribute(name:DOMString): boolean
Document Interface
createAttribute(name:DOMString): Attr
createComment(text:DOMString): Comment
createElement(tag:DOMString): Element
createTextNode(text:DOMString): Text
getElementByID(id:DOMString): Element
getElementsByTagName(tag:DOMString): NodeList
Text Interface:
Element or Attr
Comment Interface: