StropheCappuccino API 1.0.0
TNXMLNode Class Reference

#import <TNXMLNode.h>

Inheritance diagram for TNXMLNode:

List of all members.

Public Member Functions

(void) - addChildWithName: [implementation]
(void) - addChildWithName:andAttributes: [implementation]
(void) - addNode: [implementation]
(void) - addTextNode: [implementation]
(CPArray) - children [implementation]
(CPArray) - childrenWithName: [implementation]
(BOOL) - containsChildrenWithName: [implementation]
(TNXMLNode- copy [implementation]
(CPString) - description [implementation]
(void) - encodeWithCoder: [implementation]
(TNXMLNode- firstChildWithName: [implementation]
(id) - initWithCoder: [implementation]
(TNXMLNode- initWithName:andAttributes: [implementation]
(TNXMLNode- initWithNode: [implementation]
(CPString) - name [implementation]
(CPString) - namespace [implementation]
(CPArray) - ownChildrenWithName: [implementation]
(void) - setNamespace: [implementation]
(void) - setValue:forAttribute: [implementation]
(CPString) - stringValue [implementation]
(CPString) - text [implementation]
(id) - tree [implementation]
(BOOL) - up [implementation]
(CPString) - valueForAttribute: [implementation]
(id) - xmlNode [implementation]

Static Public Member Functions

(TNXMLNode+ nodeWithName: [implementation]
(TNXMLNode+ nodeWithName:andAttributes: [implementation]
(TNXMLNode+ nodeWithXMLNode: [implementation]

Detailed Description

This is an implementation of a really basic XML node in Cappuccino

Definition at line 2 of file TNXMLNode.h.


Member Function Documentation

- (void) addChildWithName: (CPString)  aTagName [implementation]

Add a child to the current seletected node This will move the stanza object pointer to the child node

Parameters:
aTagNamename of the new tag

Definition at line 242 of file TNXMLNode.j.

- (void) addChildWithName: (CPString)  aTagName
andAttributes: (CPDictionary)  attributes 
[implementation]

Add a child to the current seletected node This will move the stanza object pointer to the child node

Parameters:
aTagNamename of the new tag
attributesCPDictionary contains all attributes

Definition at line 233 of file TNXMLNode.j.

- (void) addNode: (TNXMLNode aNode [implementation]

append a node to the current node

Parameters:
aNodethe dom element to add.

Definition at line 118 of file TNXMLNode.j.

- (void) addTextNode: (CPString)  aText [implementation]

Add text value to the current seletected node

Parameters:
aTextname of the new tag

Definition at line 129 of file TNXMLNode.j.

- (CPArray) children [implementation]

get all the children of the current element

Returns:
array of TNXMLNode children

Definition at line 295 of file TNXMLNode.j.

- (CPArray) childrenWithName: (CPString)  aName [implementation]

get an CPArray of TNXMLNode with matching tag name

Parameters:
aNamethe name tags should match
Returns:
CPArray of TNXMLNode

Definition at line 251 of file TNXMLNode.j.

- (BOOL) containsChildrenWithName: (CPString)  aName [implementation]

Definition at line 300 of file TNXMLNode.j.

- (TNXMLNode) copy [implementation]

copy the current TNXMLNode

Returns:
a copy of this

Definition at line 110 of file TNXMLNode.j.

- (CPString) description [implementation]

Definition at line 171 of file TNXMLNode.j.

- (void) encodeWithCoder: (CPCoder)  aCoder [implementation]

Definition at line 319 of file TNXMLNode.j.

- (TNXMLNode) firstChildWithName: (CPString)  aName [implementation]

get the first TNXMLNode that matching tag name

Parameters:
aNamethe name tags should match
Returns:
the first matching TNXMLNode

Definition at line 282 of file TNXMLNode.j.

- (id) initWithCoder: (CPCoder)  aCoder [implementation]

Definition at line 309 of file TNXMLNode.j.

- (TNXMLNode) initWithName: (CPString)  aName
andAttributes: (CPDictionary)  attributes 
[implementation]

initialize an instance of a TNXMLNode with root node and attributes

Parameters:
aNamename of the root tag
attributesCPDictionary contains all attributes
Returns:
an instance of TNXMLNode initialized

Definition at line 94 of file TNXMLNode.j.

- (TNXMLNode) initWithNode: (id)  aNode [implementation]

initialize an instance of a TNXMLNode from a pure javascript Node

Parameters:
aNodea pure Javascript DOM Element
Returns:
an instance of TNXMLNode initialized with aNode

Definition at line 70 of file TNXMLNode.j.

- (CPString) name [implementation]

return the name of the current node

Returns:
CPString containing the name of the current node

Definition at line 204 of file TNXMLNode.j.

- (CPString) namespace [implementation]

get the xmlns field of the node

Returns:
xmlns field of node

Definition at line 212 of file TNXMLNode.j.

+ (TNXMLNode) nodeWithName: (CPString)  aName [implementation]

create an instance of a TNXMLNode from a pure javascript Node

Parameters:
aNamethe name of the node
Returns:
an instance of TNXMLNode initialized with aName

Definition at line 48 of file TNXMLNode.j.

+ (TNXMLNode) nodeWithName: (CPString)  aName
andAttributes: (CPDictionary)  someAttributes 
[implementation]

create an instance of a TNXMLNode from a pure javascript Node

Parameters:
aNamethe name of the node
someAttributesCPDictionary containing the attributes
Returns:
an instance of TNXMLNode initialized with aName and attributes

Definition at line 58 of file TNXMLNode.j.

+ (TNXMLNode) nodeWithXMLNode: (id)  aNode [implementation]

create an instance of a TNXMLNode from a pure javascript Node

Parameters:
aNodea pure Javascript DOM Element
Returns:
an instance of TNXMLNode initialized with aNode

Definition at line 39 of file TNXMLNode.j.

- (CPArray) ownChildrenWithName: (CPString)  aName [implementation]

return all direct children wth given name.

Parameters:
aNamethe name tags should match
Returns:
CPArray of TNXMLNode

Definition at line 266 of file TNXMLNode.j.

- (void) setNamespace: (CPString)  aNamespace [implementation]

set the xmlns field of the node

Parameters:
thenew xmls value

Definition at line 220 of file TNXMLNode.j.

- (void) setValue: (CPString)  aValue
forAttribute: (CPString)  anAttribute 
[implementation]

allow to set a value for a given attribute

Parameters:
aValuethe value
anAttributethe attribute name

Definition at line 192 of file TNXMLNode.j.

- (CPString) stringValue [implementation]

convert the TNXMLNode into its string representation

Returns:
string representation of the TNXMLNode

Definition at line 165 of file TNXMLNode.j.

- (CPString) text [implementation]

get the text node value

Returns:
CPString of the content of node

Definition at line 137 of file TNXMLNode.j.

- (id) tree [implementation]

return a DOM Element of the TNXMLNode

Returns:
an DOM Element

Definition at line 145 of file TNXMLNode.j.

- (BOOL) up [implementation]

Move the pointer to the parent of the current node

Definition at line 152 of file TNXMLNode.j.

- (CPString) valueForAttribute: (CPString)  anAttribute [implementation]

get value of an attribute of the current node

Parameters:
anAttributethe attribute
Returns:
the value of anAttribute

Definition at line 183 of file TNXMLNode.j.

- (id) xmlNode [implementation]

Synthesized accessor method.

Definition at line 333 of file TNXMLNode.j.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables