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

Poco::XML::Node Class Reference

#include <Node.h>

Inheritance diagram for Poco::XML::Node:

Poco::XML::EventTarget Poco::XML::DOMObject Poco::XML::AbstractNode Poco::XML::AbstractContainerNode Poco::XML::Attr Poco::XML::CharacterData Poco::XML::EntityReference Poco::XML::Notation Poco::XML::ProcessingInstruction Poco::XML::Document Poco::XML::DocumentFragment Poco::XML::DocumentType Poco::XML::Element Poco::XML::Entity Poco::XML::Comment Poco::XML::Text Poco::XML::CDATASection

List of all members.


Detailed Description

The Node interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a DOMException being raised.

The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.

This implementation differs in some ways from the W3C DOM recommendations. For example, the DOM specifies that some methods can return null strings. Instead of null strings, this implementation always returns empty strings.

Definition at line 57 of file Node.h.


Public Types

enum  {
  ELEMENT_NODE = 1, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
  ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE,
  DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE
}

Public Member Functions

virtual void addEventListener (const XMLString &type, EventListener *listener, bool useCapture)=0
virtual NodeappendChild (Node *newChild)=0
virtual NamedNodeMapattributes () const =0
virtual void autoRelease ()=0
virtual NodeListchildNodes () const =0
virtual NodecloneNode (bool deep) const =0
virtual bool dispatchEvent (Event *evt)=0
void duplicate () const
virtual NodefirstChild () const =0
virtual const XMLString & getNodeValue () const =0
 Returns the value of this node, depending on its type.
virtual bool hasAttributes () const =0
 Returns the local name of the node.
virtual bool hasChildNodes () const =0
virtual XMLString innerText () const =0
 Returns whether this node (if it is an element) has any attributes.
virtual NodeinsertBefore (Node *newChild, Node *refChild)=0
virtual bool isSupported (const XMLString &feature, const XMLString &version) const =0
virtual NodelastChild () const =0
virtual const XMLString & localName () const =0
 Returns the namespace prefix from the qualified name of the node.
virtual const XMLString & namespaceURI () const =0
virtual NodenextSibling () const =0
virtual const XMLString & nodeName () const =0
virtual unsigned short nodeType () const =0
const XMLString & nodeValue () const
 Returns the name of this node, depending on its type.
virtual void normalize ()=0
virtual DocumentownerDocument () const =0
virtual NodeparentNode () const =0
 Returns a code representing the type of the underlying object.
virtual XMLString prefix () const =0
virtual NodepreviousSibling () const =0
void release () const
 Increases the object's reference count.
virtual NoderemoveChild (Node *oldChild)=0
virtual void removeEventListener (const XMLString &type, EventListener *listener, bool useCapture)=0
virtual NodereplaceChild (Node *newChild, Node *oldChild)=0
virtual void setNodeValue (const XMLString &value)=0
 Returns the value of this node, depending on its type.

Protected Member Functions

virtual ~Node ()

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

Generated by  Doxygen 1.6.0   Back to index