Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_XMLDocNode Class Reference

A class to represent a single XML element in a CP_XMLDocument. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_XMLDocNode (const XML_Char *inNodeName)
 Constructor.
 CP_XMLDocNode (CFXMLTreeRef inTreeRef)
virtual ~CP_XMLDocNode ()
Child Nodes
CP_XMLDocNodeAddChildNode (const XML_Char *inNodeName)
bool HasChildren ()
UInt32 GetChildNodeCount ()
CP_XMLDocNodeGetNthChildNode (UInt32 inIndex)
CP_DocNodes_ArrayGetChildNodeList ()
CP_XMLDocNodeAddChildNode (CFXMLTreeRef inTreeRef)
Getters
CP_E_XMLDocNodeType GetNodeType ()
CP_String GetNodeName ()
bool HasCharData ()
CP_String GetCharData ()
CP_XMLAttributes GetAttributes ()
Setters
void SetNodeType (CP_E_XMLDocNodeType inType)
void SetCharData (const CP_String &inCharData)
void SetAttributes (CP_XMLAttributes &inAttributes)

Protected Attributes

CP_E_XMLDocNodeType fNodeType
CP_String fNodeName
CP_String fCharData
CP_XMLAttributes fAttributes
CP_DocNodes_ArrayfChildNodes


Detailed Description


Constructor & Destructor Documentation

CP_XMLDocNode::CP_XMLDocNode const XML_Char *  inNodeName  ) 
 

Constructor.

Parameters:
inNodeName The name of the inNode.
Exceptions:
none 

CP_XMLDocNode::CP_XMLDocNode CFXMLTreeRef  inTreeRef  ) 
 

Constructor. Constructs this node from a CFXMLTreeRef.

Parameters:
inTreeRef A MacOS CFXMLTreeRef to construct the node from.
Exceptions:
none 

CP_XMLDocNode::~CP_XMLDocNode  )  [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_XMLDocNode * CP_XMLDocNode::AddChildNode const XML_Char *  inNodeName  ) 
 

Adds a new child inNode to this inNode, which then becomes the parent of the new child inNode.

Parameters:
inNodeName The name of the inNode.
Exceptions:
none 
Returns:
CP_XMLDocNode * A pointer to the inNode just created.

bool CP_XMLDocNode::HasChildren  ) 
 

Returns true if this inNode has any child nodes.

Exceptions:
none 
Returns:
bool True if there are any child nodes to this inNode.

UInt32 CP_XMLDocNode::GetChildNodeCount  ) 
 

Returns the number of child nodes for this inNode.

Exceptions:
none 
Returns:
UInt32 The number of child nodes for this inNode.

CP_XMLDocNode * CP_XMLDocNode::GetNthChildNode UInt32  inIndex  ) 
 

Returns the Nth child inNode of this parent inNode. inIndex should be between 1 and the number of child nodes of this parent.

Parameters:
inIndex A 1 based index of the inNode to return.
Exceptions:
none 
Returns:
CP_XMLDocNode * A pointer to the inNode. If inIndex is not in range, NULL is returned.

CP_DocNodes_Array* CP_XMLDocNode::GetChildNodeList  ) 
 

Returns a list of the child nodes.

Exceptions:
none 
Returns:
CP_DocNodesArray A list of the child nodes.

CP_XMLDocNode * CP_XMLDocNode::AddChildNode CFXMLTreeRef  inTreeRef  ) 
 

Add the child nodes from the passed in CFXMLTreeRef to this node.

Parameters:
inTreeRef CFXMLTreeRef that contains the nodes to add.
Exceptions:
none 
Returns:
void

CP_E_XMLDocNodeType CP_XMLDocNode::GetNodeType  ) 
 

Returns the type of node.

Exceptions:
none 
Returns:
CP_E_XMLDocNodeType The type of node.

CP_String CP_XMLDocNode::GetNodeName  ) 
 

Returns the name of this node.

Exceptions:
none 
Returns:
CP_String The name of the node.

bool CP_XMLDocNode::HasCharData  ) 
 

Returns true if this node contains character data.

Exceptions:
none 
Returns:
bool True if this node contains character data.

CP_String CP_XMLDocNode::GetCharData  ) 
 

Returns the character data for the node.

Exceptions:
none 
Returns:
CP_String The string contains the character data.

CP_XMLAttributes CP_XMLDocNode::GetAttributes  ) 
 

Returns a CP_XMLAttributes object for the attributes, if any, for this node.

Exceptions:
none 
Returns:
CP_XMLAttributes The attributes, if any, for this node.

void CP_XMLDocNode::SetNodeType CP_E_XMLDocNodeType  inType  ) 
 

Sets the type of node this is.

Parameters:
inType The CP_E_XMLDocNodeType of this node.
Exceptions:
none 
Returns:
void

void CP_XMLDocNode::SetCharData const CP_String inCharData  ) 
 

Sets the character data for the node from the passed in CP_String.

Parameters:
inCharData A CP_String containing the character data for this node.
Exceptions:
none 
Returns:
void

void CP_XMLDocNode::SetAttributes CP_XMLAttributes inAttributes  ) 
 

Sets the attributes for this node.

Parameters:
inAttributes A CP_XMLAttributes object containing the attributes for this node.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_E_XMLDocNodeType CP_XMLDocNode::fNodeType [protected]
 

CP_String CP_XMLDocNode::fNodeName [protected]
 

Type of node.

CP_String CP_XMLDocNode::fCharData [protected]
 

The name of the node as it appears in the XML file.

CP_XMLAttributes CP_XMLDocNode::fAttributes [protected]
 

Character data associated with this node.

CP_DocNodes_Array* CP_XMLDocNode::fChildNodes [protected]
 

Any attributes for this node.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:22:24 2005 for CPLAT_MacOS by  doxygen 1.4.0