#include <Element.h>
Inheritance diagram for org::w3c::dom::Element:
Element
interface represents an element in an HTML or XML document.
Elements may have attributes associated with them; since the Element
interface inherits from Node
, the generic Node
interface attribute attributes
may be used to retrieve the set of all attributes for an element. There are methods on the Element
interface to retrieve either an Attr
object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr
object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience. <p >Note: In DOM Level 2, the method normalize
is inherited from the Node
interface where it was moved.
See also the Document acdk::lang::Object Model (DOM) Level 3 Core Specification.
Public Member Functions | |
virtual RString | getTagName ()=0 |
The name of the element. | |
virtual RString | getAttribute (IN(RString) name)=0 |
Retrieves an attribute value by name. | |
virtual void | setAttribute (IN(RString) name, IN(RString) value)=0 throw ( RDOMException ) |
Adds a new attribute. | |
virtual void | removeAttribute (IN(RString) name)=0 throw ( RDOMException ) |
Removes an attribute by name. | |
virtual RAttr | getAttributeNode (IN(RString) name)=0 |
Retrieves an attribute node by name. | |
virtual RAttr | setAttributeNode (IN(RAttr) newAttr)=0 throw ( RDOMException ) |
Adds a new attribute node. | |
virtual RAttr | removeAttributeNode (IN(RAttr) oldAttr)=0 throw ( RDOMException ) |
Removes the specified attribute node. | |
virtual RNodeList | getElementsByTagName (IN(RString) name)=0 |
Returns a NodeList of all descendant Elements with a given tag name, in document order. | |
virtual void | normalize ()=0 |
virtual int | attributeCount ()=0 |
dom4j like extension | |
virtual RAttr | attribute (int idx)=0 |
dom4j like extension | |
virtual RElement | addAttribute (IN(RString) name, IN(RString) value) |
dom4j like extension if value == Nil the attribute will be removed if attribute already exists it will be replaced | |
virtual RElement | addComment (IN(RString) comment) |
dom4j like extension add a new element as child | |
virtual RElement | addCDATA (IN(RString) cdata) |
dom4j like extension add a new element as child | |
virtual RElement | addEntity (IN(RString) name, IN(RString) text) |
dom4j like extension add a new element as child | |
virtual RElement | addText (IN(RString) text) |
dom4j like extension add a new element as child |
|
dom4j like extension if value == Nil the attribute will be removed if attribute already exists it will be replaced
|
|
dom4j like extension add a new element as child
|
|
dom4j like extension add a new element as child
|
|
dom4j like extension add a new element as child
|
|
dom4j like extension add a new element as child
|
|
dom4j like extension
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
dom4j like extension
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Retrieves an attribute value by name.
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Retrieves an attribute node by name.
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Returns a
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
The name of the element.
If
|
|
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Removes an attribute by name.
If a default value for the removed attribute is defined in the DTD, a new attribute immediately appears with the default value as well as the corresponding namespace URI, local name, and prefix when applicable. The implementation may handle default values from other schemas similarly but applications should use
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Removes the specified attribute node.
If a default value for the removed
Implemented in acdk::xml::dom::XMLElement. |
|
Adds a new attribute.
If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an
Implemented in acdk::xml::dom::XMLElement, and acdk::xml::libxmldom::LibXMLElement. |
|
Adds a new attribute node.
If an attribute with that name (
Implemented in acdk::xml::dom::XMLElement. |