Scott Lanning

NAME

Mozilla::DOM::Document

Mozilla::DOM::Document is a wrapper around an instance of Mozilla's nsIDOMDocument interface. This inherits from Mozilla::DOM::Node.

 * The nsIDOMDocument interface represents the entire HTML or XML document.
 * Conceptually, it is the root of the document tree, and provides the
 * primary access to the document's data.
 * Since elements, text nodes, comments, processing instructions, etc.
 * cannot exist outside the context of a Document, the nsIDOMDocument
 * interface also contains the factory methods needed to create these
 * objects.
 *
 * For more information on this interface please see
 * L<http:E<sol>E<sol>www.w3.orgE<sol>TRE<sol>DOM-Level-2-CoreE<sol>>

CLASS METHODS

$iid = Mozilla::DOM::Document->GetIID()

Pass this to QueryInterface.

METHODS

$node = $document->CreateAttribute($name)

    • $name (string)

$attr = $document->CreateAttributeNS($namespaceURI, $qualifiedName)

    • $namespaceURI (string)

    • $qualifiedName (string)

$node = $document->CreateCDATASection($text)

    • $data (string)

$node = $document->CreateComment($text)

    • $data (string)

$doc_fragment = $document->CreateDocumentFragment()

$element = $document->CreateElement($tagname)

    • $tagname (string)

$element = $document->CreateElementNS($namespaceURI, $qualifiedName)

    • $namespaceURI (string)

    • $qualifiedName (string)

$node = $document->CreateEntityReference($name)

    • $name (string)

$node = $node = $document->CreateProcessingInstruction($target, $text)

    • $target (string)

    • $data (string)

$textnode = $document->CreateTextNode($text)

    • $data (string)

$document_type = $document->GetDoctype()

$element = $document->GetDocumentElement()

$element = $document->GetElementById($elementId)

    • $elementId (string)

$domlist = $document->GetElementsByTagName($tagname)

In scalar context, returns a Mozilla::DOM::NodeList. In list context, returns a list of Mozilla::DOM::Elements.

    • $tagname (string)

$element = $document->GetElementsByTagNameNS($namespaceURI, $localName)

In scalar context, returns a Mozilla::DOM::NodeList. In list context, returns a list of Mozilla::DOM::Elements.

    • $namespaceURI (string)

    • $localName (string)

$dom_implementation = $document->GetImplementation()

$document->ImportNode($node, $deep)

    • $importedNode (Mozilla::DOM::Node)

    • $deep (boolean)

    $deep = boolean

SEE ALSO

Mozilla::DOM

COPYRIGHT

Copyright (C) 2005-2007, Scott Lanning

This software is licensed under the LGPL. See Mozilla::DOM for a full notice.




Hosting generously
sponsored by Bytemark