Scott Lanning > Mozilla-DOM > Mozilla::DOM::Element

Download:
Mozilla-DOM-0.23.tar.gz

Annotate this POD

CPAN RT

New  2
Open  5
View/Report Bugs
Source  

NAME ^

Mozilla::DOM::Element

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

 * The nsIDOMElement interface represents an element in an HTML or
 * XML document.
 *
 * 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>>

Note: you can QueryInterface an Element object to a subclass like HTMLSelectElement (from which of course you can call Element methods).

CLASS METHODS ^

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

Pass this to QueryInterface.

METHODS ^

$tagname = $element->GetTagName()

$bool = $element->HasAttribute($name)

$attr = $element->GetAttribute($name)

$element->SetAttribute($name, $value)

$element->RemoveAttribute($name)

$bool = $element->HasAttributeNS($namespaceURI, $localName)

$attr = $element->GetAttributeNS($namespaceURI, $localName)

$element->SetAttributeNS($namespaceURI, $qualifiedName, $value)

$element->RemoveAttributeNS($namespaceURI, $localName)

$attrnode = $element->GetAttributeNode($name)

$attrnode = $element->SetAttributeNode($newAttr)

$attrnode = $element->RemoveAttributeNode($attrnode)

$attrnode = $element->GetAttributeNodeNS($namespaceURI, $localName)

$attrnode = $element->SetAttributeNodeNS($newAttr)

$nodelist = $element->GetElementsByTagName($name)

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

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

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

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.

syntax highlighting: