|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Node | +--Document
Class representing the DOM Document interface.
Field Summary | |
private DocumentType |
$doctype
An instance of the DocumentType interface representing the DTD; If no DTD was declared in the document, this property is null. DOM-Level 1 |
private Element |
$documentElement
Points to the single Element node that is the root of the XML tree. DOM-Level 1 |
private DOMImplementation |
$implementation
An reference to the DOMImplementation that is responsible for this document. DOM-Level 1 |
Fields inherited from class Node |
$attributes, $childNodes, $firstChild, $lastChild, $localName, $namespaceURI, $nextSibling, $nodeID, $nodeName, $nodeType, $nodeValue, $ownerDocument, $parentNode, $prefix, $previousSibling, $readonly |
Constructor Summary | |
Document()
Constructor of the class. |
Method Summary | |
Attr |
createAttribute(var $name)
Creates an Attribute node. DOM-Level 1 |
Attr |
createAttributeNS(var $namespaceURI,
var $qualifiedName)
Same as createAttribute, but includes support for XML namespaces. DOM-Level 2 |
CDataSection |
createCDataSection(var $data)
Creates a CDataSection node. DOM-Level 1 |
Comment |
createComment(var $data)
Creates a Comment node. DOM-Level 1 |
DocumentFragment |
createDocumentFragment()
Creates a DocumentFragment node. DOM-Level 1 |
Element |
createElement(var $tagName)
Creates an Element node. DOM-Level 1 |
Element |
createElementNS(var $namespaceURI,
var $qualifiedName)
Same as createElement, but includes support for XML namespaces. DOM-Level 2 |
EntityReference |
createEntityReference(var $name)
Creates an EntityReference node (not supported yet) DOM-Level 1 |
ProcessingInstruction |
createProcessingInstruction(var $target,
var $data)
Creates a ProcessingInstruction node. DOM-Level 1 |
Text |
createTextNode(var $data)
Creates a Text node. DOM-Level 1 |
DocumentType |
getDoctype()
Returns an reference to the DocumentType object. DOM-Level 1 |
Element |
getDocumentElement()
Returns an reference to the root element. DOM-Level 1 |
Element |
getElementById(var $elementID)
Returns a Element node from the current document whose id attribute matches the given id. DOM-Level 2 -- NYI |
private void |
getElementByIdHelp(var $id,
var $dtd,
var $parent)
Runs recursively through the DOM-Tree and returns the element with attribute id. |
NodeList |
getElementsByTagName(var $tagName)
Returns a NodeList of Element nodes from the current document whose tagName attribute matches the given tagname. DOM-Level 1 |
private void |
getElementsByTagNameList(var $tagName,
var $parent,
var $result)
Runs recursively through the DOM-Tree and returns a NodeList with all Element nodes that have the searched tagname. |
NodeList |
getElementsByTagNameNS(var $namespaceURI,
var $localName)
Same as getElementByTagName, but includes support for XML namespaces. DOM-Level 2 |
private void |
getElementsByTagNameNSList(var $namespaceURI,
var $localName,
var $parent,
var $result)
Runs recursively through the DOM-Tree and returns a NodeList with all Element nodes that have the searched $namespaceURI and $localName. |
DOMImplementation |
getImplementation()
Returns an reference to the DOMImplementation object. DOM-Level 1 |
Node |
importNode(var $importedNode,
var $deep)
Creates a copy of a Node object from another document that can be inserted within the current documents node hierarchy. DOM-Level 2 |
Field Detail |
private DocumentType $doctype
private Element $documentElement
private DOMImplementation $implementation
Constructor Detail |
public Document()
Method Detail |
public DocumentType getDoctype()
public Element getDocumentElement()
public DOMImplementation getImplementation()
public Attr createAttribute(var $name)
$name
- string
$value
- string
public CDataSection createCDataSection(var $data)
$data
- public Comment createComment(var $data)
$data
- string
public DocumentFragment createDocumentFragment()
public Element createElement(var $tagName)
$tagName
- string
public EntityReference createEntityReference(var $name)
$name
- string
public ProcessingInstruction createProcessingInstruction(var $target, var $data)
$target
- string
$data
- string
public Text createTextNode(var $data)
$data
- string
public NodeList getElementsByTagName(var $tagName)
$tagName
- string
public Attr createAttributeNS(var $namespaceURI, var $qualifiedName)
$namespaceURI
- string
$qualifiedName
- string
public Element createElementNS(var $namespaceURI, var $qualifiedName)
$namespaceURI
- string
$qualifiedName
- string
public Element getElementById(var $elementID)
$elementID
- string
public NodeList getElementsByTagNameNS(var $namespaceURI, var $localName)
$namespaceURI
- string
$localName
- string
public Node importNode(var $importedNode, var $deep)
$importedNode
- Node$deep
- boolean
$importedNode
- is passed by referenceprivate void getElementByIdHelp(var $id, var $dtd, var $parent)
$tagName
- string
$id
- boolean
$parent
- Node$parent
- is passed by referenceprivate void getElementsByTagNameList(var $tagName, var $parent, var $result)
$tagName
- string
$parent
- Node$result
- NodeList$parent
- is passed by reference$result
- is passed by referenceprivate void getElementsByTagNameNSList(var $namespaceURI, var $localName, var $parent, var $result)
$namespaceURI
- string
$localName
- string
$parent
- Node$result
- NodeList$parent
- is passed by reference$result
- is passed by reference
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |