Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::XML::Element Class Reference

#include <Element.h>

Inheritance diagram for Poco::XML::Element:

Poco::XML::AbstractContainerNode Poco::XML::AbstractNode Poco::XML::Node Poco::XML::EventTarget Poco::XML::DOMObject

List of all members.

Detailed Description

The Element interface represents an element in an 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.

Definition at line 57 of file Element.h.

Public Types

enum  {

Public Member Functions

void addEventListener (const XMLString &type, EventListener *listener, bool useCapture)
NodeappendChild (Node *newChild)
NamedNodeMapattributes () const
virtual void autoRelease ()
NodeListchildNodes () const
NodecloneNode (bool deep) const
bool dispatchEvent (Event *evt)
void duplicate () const
NodefirstChild () const
const XMLString & getAttribute (const XMLString &name) const
AttrgetAttributeNode (const XMLString &name) const
 Removes an attribute by name.
AttrgetAttributeNodeNS (const XMLString &namespaceURI, const XMLString &localName) const
 Removes an attribute by name.
const XMLString & getAttributeNS (const XMLString &namespaceURI, const XMLString &localName) const
ElementgetChildElement (const XMLString &name) const
ElementgetChildElementNS (const XMLString &namespaceURI, const XMLString &localName) const
ElementgetElementById (const XMLString &elementId, const XMLString &idAttribute) const
ElementgetElementByIdNS (const XMLString &elementId, const XMLString &idAttributeURI, const XMLString &idAttributeLocalName) const
NodeListgetElementsByTagName (const XMLString &name) const
 Removes the specified attribute.
NodeListgetElementsByTagNameNS (const XMLString &namespaceURI, const XMLString &localName) const
 Returns true if and only if the element has the specified attribute.
const XMLString & getNodeValue () const
 Returns the value of this node, depending on its type.
bool hasAttribute (const XMLString &name) const
bool hasAttributeNS (const XMLString &namespaceURI, const XMLString &localName) const
 Returns true if and only if the element has the specified attribute.
bool hasAttributes () const
 Returns the local name of the node.
bool hasChildNodes () const
XMLString innerText () const
 Returns whether this node (if it is an element) has any attributes.
NodeinsertBefore (Node *newChild, Node *refChild)
bool isSupported (const XMLString &feature, const XMLString &version) const
NodelastChild () const
const XMLString & localName () const
 Returns the namespace prefix from the qualified name of the node.
const XMLString & namespaceURI () const
NodenextSibling () const
const XMLString & nodeName () const
unsigned short nodeType () const
const XMLString & nodeValue () const
 Returns the name of this node, depending on its type.
void normalize ()
DocumentownerDocument () const
NodeparentNode () const
 Returns a code representing the type of the underlying object.
XMLString prefix () const
NodepreviousSibling () const
void release () const
 Increases the object's reference count.
void removeAttribute (const XMLString &name)
AttrremoveAttributeNode (Attr *oldAttr)
void removeAttributeNS (const XMLString &namespaceURI, const XMLString &localName)
NoderemoveChild (Node *oldChild)
void removeEventListener (const XMLString &type, EventListener *listener, bool useCapture)
NodereplaceChild (Node *newChild, Node *oldChild)
void setAttribute (const XMLString &name, const XMLString &value)
AttrsetAttributeNode (Attr *newAttr)
 Retrieves an Attr node by name.
AttrsetAttributeNodeNS (Attr *newAttr)
 Retrieves an Attr node by name.
void setAttributeNS (const XMLString &namespaceURI, const XMLString &qualifiedName, const XMLString &value)
void setNodeValue (const XMLString &value)
 Returns the value of this node, depending on its type.
const XMLString & tagName () const

Protected Member Functions

void bubbleEvent (Event *evt)
void captureEvent (Event *evt)
NodecopyNode (bool deep, Document *pOwnerDocument) const
void dispatchAttrModified (Attr *pAttr, MutationEvent::AttrChangeType changeType, const XMLString &prevValue, const XMLString &newValue)
void dispatchCharacterDataModified (const XMLString &prevValue, const XMLString &newValue)
void dispatchNodeInserted ()
void dispatchNodeInsertedIntoDocument ()
void dispatchNodeRemoved ()
void dispatchNodeRemovedFromDocument ()
void dispatchSubtreeModified ()
 Element (Document *pOwnerDocument, const Element &elem)
 Element (Document *pOwnerDocument, const XMLString &namespaceURI, const XMLString &localName, const XMLString &qname)
virtual bool events () const
virtual bool eventsSuspended () const
void setOwnerDocument (Document *pOwnerDocument)

Static Protected Attributes

static const XMLString EMPTY_STRING

Private Attributes

const Name_name


class Attr
class AttrMap
class Document

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index