Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skNode Class Reference

This class describes a node within an XML document hierarchy. More...

#include <skNode.h>

Inheritance diagram for skNode:

skElement skTextNode skCDataNode List of all members.

Public Types

enum  NodeType
 This enumeration is used to distinguish between different types of node in a document.


Public Member Functions

virtual IMPORT_C ~skNode ()
 Virtual destructor.

virtual IMPORT_C skString getNodeValue () const
 This method returns the "value" of a node.

virtual IMPORT_C void setNodeValue (const skString &s)
 This method sets the "value" of the node.

virtual IMPORT_C NodeType getNodeType () const=0
 This abstract virtual function returns the type of this node.

virtual IMPORT_C skNode * clone ()=0
 This abstract virtual function requests that the node create a copy of itself.

virtual IMPORT_C skString toString () const=0
 This abstract virtual function writes a textual representation of this node and its children to a string.

virtual IMPORT_C void write (skOutputDestination &out) const=0
 This abstract virtual function writes a textual representation of this node and its children to the given destination.

IMPORT_C void setParent (skElement *parent)
 Sets the owning element.

IMPORT_C skElementgetParent ()
 Returns the owning element.

virtual IMPORT_C bool equals (const skNode &other) const=0
 Does a deep comparison against another node.


Static Public Member Functions

IMPORT_C skString escapeXMLDelimiters (const skString &text, bool include_quote)
 This static method searches the given text for characters which must be "escaped" in an XML document.


Protected Member Functions

 skNode ()
 Blank constructor.


Protected Attributes

skElementm_Parent
 Pointer to the parent Element.


Detailed Description

This class describes a node within an XML document hierarchy.

It is part of the classes used in the Simkin XML DOM (Document Object Model)


Member Function Documentation

virtual IMPORT_C skNode* skNode::clone  )  [pure virtual]
 

This abstract virtual function requests that the node create a copy of itself.

How this is done depends on the actual class of the node.

Returns:
a new node which is a clone of this one. A "deep" copy is performed.
Exceptions:
Symbian - a leaving function

Implemented in skElement, skTextNode, and skCDataNode.

IMPORT_C skString skNode::escapeXMLDelimiters const skString text,
bool  include_quote
[static]
 

This static method searches the given text for characters which must be "escaped" in an XML document.

Parameters:
text the text to search for special characters within
include_quote if true, the function replaces quotes with the quote escape character, otherwise it ignores quotes
Returns:
a version of text with the special characters replaced with escaped versions
Exceptions:
Symbian - a leaving function

virtual IMPORT_C NodeType skNode::getNodeType  )  const [pure virtual]
 

This abstract virtual function returns the type of this node.

It will be one of the NodeType values

Returns:
a NodeType value indicating the class to which this node belongs

Implemented in skElement, skTextNode, and skCDataNode.

virtual IMPORT_C skString skNode::getNodeValue  )  const [virtual]
 

This method returns the "value" of a node.

Typically this would be the text for a text or cdata node.

Returns:
returns a string. By default this is an empty string.

Reimplemented in skTextNode.

virtual IMPORT_C void skNode::setNodeValue const skString s  )  [virtual]
 

This method sets the "value" of the node.

Typically this would be the text for a text or cdata node. For other nodes, this does nothing.

Parameters:
s - the new value

Reimplemented in skTextNode.

virtual IMPORT_C skString skNode::toString  )  const [pure virtual]
 

This abstract virtual function writes a textual representation of this node and its children to a string.

Returns:
the string containing the node
Exceptions:
Symbian - a leaving function

Implemented in skElement, and skTextNode.

virtual IMPORT_C void skNode::write skOutputDestination out  )  const [pure virtual]
 

This abstract virtual function writes a textual representation of this node and its children to the given destination.

Parameters:
out - the destination to write to
Exceptions:
Symbian - a leaving function

Implemented in skElement, skTextNode, and skCDataNode.


The documentation for this class was generated from the following file:
Generated on Fri Dec 17 20:28:27 2004 for Simkin C++ for Symbian by doxygen1.3