2005/5/9

     
 

class LibXMLElement

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::xml::libxmldom::LibXMLElement Class Reference

#include <LibXMLElement.h>

Inheritance diagram for acdk::xml::libxmldom::LibXMLElement:

acdk::xml::libxmldom::LibXMLNode org::w3c::dom::Element acdk::lang::Object org::w3c::dom::Node acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Public Member Functions

 LibXMLElement (xmlNodePtr np, bool ownsPtr=false)
RString getTagName ()
 The name of the element.

RString getAttribute (IN(RString) name)
 Retrieves an attribute value by name.

void setAttribute (IN(RString) name, IN(RString) value) throw ( org::w3c::dom::RDOMException )
 Adds a new attribute.

void removeAttribute (IN(RString) name) throw ( org::w3c::dom::RDOMException )
 Removes an attribute by name.

org::w3c::dom::RAttr getAttributeNode (IN(RString) name)
 Retrieves an attribute node by name.

org::w3c::dom::RAttr setAttributeNode (IN(org::w3c::dom::RAttr) newAttr) throw ( org::w3c::dom::RDOMException )
org::w3c::dom::RAttr removeAttributeNode (IN(org::w3c::dom::RAttr) oldAttr) throw ( org::w3c::dom::RDOMException )
org::w3c::dom::RNodeList getElementsByTagName (IN(RString) name)
 Returns a NodeList of all descendant Elements with a given tag name, in document order.

RString getAttributeNS (IN(RString) namespaceURI, IN(RString) localName)
void setAttributeNS (IN(RString) namespaceURI, IN(RString) qualifiedName, IN(RString) value) throw ( org::w3c::dom::RDOMException )
void removeAttributeNS (IN(RString) namespaceURI, IN(RString) localName) throw ( org::w3c::dom::RDOMException )
org::w3c::dom::RAttr getAttributeNodeNS (IN(RString) namespaceURI, IN(RString) localName)
org::w3c::dom::RAttr setAttributeNodeNS (IN(org::w3c::dom::RAttr) newAttr) throw ( org::w3c::dom::RDOMException )
org::w3c::dom::RNodeList getElementsByTagNameNS (IN(RString) namespaceURI, IN(RString) localName)
bool hasAttribute (IN(RString) name)
bool hasAttributeNS (IN(RString) namespaceURI, IN(RString) localName)
void setIdAttribute (IN(RString) name, bool isId)
void setIdAttributeNode (IN(org::w3c::dom::RAttr) isAddr, bool isId)
void setIdAttributeNS (IN(RString) namespaceURI, IN(RString) localName, bool isId)
RString toString ()
 return a string representation of this object Object::toString() return getName() by default

void normalize ()
int attributeCount ()
 dom4j like extension

org::w3c::dom::RAttr attribute (int idx)
 dom4j like extension

RString toXML ()
 dom4j like extension


Constructor & Destructor Documentation

acdk::xml::libxmldom::LibXMLElement::LibXMLElement xmlNodePtr  np,
bool  ownsPtr = false
[inline]
 


Member Function Documentation

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::attribute int  idx  )  [virtual]
 

dom4j like extension

Implements org::w3c::dom::Element.

int acdk::xml::libxmldom::LibXMLElement::attributeCount  )  [virtual]
 

dom4j like extension

Implements org::w3c::dom::Element.

RString acdk::xml::libxmldom::LibXMLElement::getAttribute IN(RString name  )  [virtual]
 

Retrieves an attribute value by name.

Parameters:
name The name of the attribute to retrieve.
Returns:
The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

Implements org::w3c::dom::Element.

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::getAttributeNode IN(RString name  )  [virtual]
 

Retrieves an attribute node by name.


To retrieve an attribute node by qualified name and namespace URI, use the getAttributeNodeNS method.

Parameters:
name The name (nodeName) of the attribute to retrieve.
Returns:
The Attr node with the specified name ( nodeName) or null if there is no such attribute.

Implements org::w3c::dom::Element.

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::getAttributeNodeNS IN(RString namespaceURI,
IN(RString localName
 

RString acdk::xml::libxmldom::LibXMLElement::getAttributeNS IN(RString namespaceURI,
IN(RString localName
 

org::w3c::dom::RNodeList acdk::xml::libxmldom::LibXMLElement::getElementsByTagName IN(RString name  )  [virtual]
 

Returns a NodeList of all descendant Elements with a given tag name, in document order.

Parameters:
name The name of the tag to match on. The special value * matches all tags.
Returns:
A list of matching Element nodes.

Implements org::w3c::dom::Element.

org::w3c::dom::RNodeList acdk::xml::libxmldom::LibXMLElement::getElementsByTagNameNS IN(RString namespaceURI,
IN(RString localName
 

RString acdk::xml::libxmldom::LibXMLElement::getTagName  )  [inline, virtual]
 

The name of the element.

If Node.localName is different from null, this attribute is a qualified name. For example, in:

<elementExample id=demo> ... </elementExample> ,
tagName has the value elementExample. Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.

Implements org::w3c::dom::Element.

bool acdk::xml::libxmldom::LibXMLElement::hasAttribute IN(RString name  ) 
 

bool acdk::xml::libxmldom::LibXMLElement::hasAttributeNS IN(RString namespaceURI,
IN(RString localName
 

void acdk::xml::libxmldom::LibXMLElement::normalize  )  [inline]
 

Reimplemented from acdk::xml::libxmldom::LibXMLNode.

void acdk::xml::libxmldom::LibXMLElement::removeAttribute IN(RString name  )  throw ( org::w3c::dom::RDOMException ) [inline, virtual]
 

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 Document.normalizeDocument() to guarantee this information is up-to-date.
If no attribute with this name is found, this method has no effect.
To remove an attribute by local name and namespace URI, use the removeAttributeNS method.

Parameters:
name The name of the attribute to remove.
Exceptions:
DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

Implements org::w3c::dom::Element.

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::removeAttributeNode IN(org::w3c::dom::RAttr oldAttr  )  throw ( org::w3c::dom::RDOMException )
 

void acdk::xml::libxmldom::LibXMLElement::removeAttributeNS IN(RString namespaceURI,
IN(RString localName
throw ( org::w3c::dom::RDOMException ) [inline]
 

void acdk::xml::libxmldom::LibXMLElement::setAttribute IN(RString name,
IN(RString value
throw ( org::w3c::dom::RDOMException ) [virtual]
 

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 Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.
To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.

Parameters:
name The name of the attribute to create or alter.
value Value to set in string form.
Exceptions:
DOMException INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

Implements org::w3c::dom::Element.

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::setAttributeNode IN(org::w3c::dom::RAttr newAttr  )  throw ( org::w3c::dom::RDOMException )
 

org::w3c::dom::RAttr acdk::xml::libxmldom::LibXMLElement::setAttributeNodeNS IN(org::w3c::dom::RAttr newAttr  )  throw ( org::w3c::dom::RDOMException )
 

void acdk::xml::libxmldom::LibXMLElement::setAttributeNS IN(RString namespaceURI,
IN(RString qualifiedName,
IN(RString value
throw ( org::w3c::dom::RDOMException )
 

void acdk::xml::libxmldom::LibXMLElement::setIdAttribute IN(RString name,
bool  isId
[inline]
 

void acdk::xml::libxmldom::LibXMLElement::setIdAttributeNode IN(org::w3c::dom::RAttr isAddr,
bool  isId
 

void acdk::xml::libxmldom::LibXMLElement::setIdAttributeNS IN(RString namespaceURI,
IN(RString localName,
bool  isId
 

RString acdk::xml::libxmldom::LibXMLElement::toString  )  [inline, virtual]
 

return a string representation of this object Object::toString() return getName() by default

Reimplemented from acdk::xml::libxmldom::LibXMLNode.

RString acdk::xml::libxmldom::LibXMLElement::toXML  )  [inline, virtual]
 

dom4j like extension

Todo:
implement in derived interfaces

Reimplemented from acdk::xml::libxmldom::LibXMLNode.