[Previous] [Up] [Next]

GSXMLAttribute

Authors

Michael Pakhantsov
Richard Frith-Macdonald

Version: $Revision$

Date: $Date$

GSXMLAttribute

GSXMLAttribute

Declared in: GSXML.h

Inherits from: GSXMLNode


XML Attribute.

Instance Variables

Methods


Class Methods

attributeWithNode:name:value:

+ (GSXMLAttribute*) attributeWithNode: (GSXMLNode*)node name: (NSString*)name value: (NSString*)value;

Create a new property carried by a node.


descriptionFromType:

+ (NSString*) descriptionFromType: (int)type;

Return the string constant value for the attribute type given.


typeFromDescription:

+ (int) typeFromDescription: (NSString*)desc;

Return the numeric constant value for the attribute type named. This method is inefficient, so the returned value should be saved for re-use later. The possible values are -


attributeFrom:

+ (GSXMLAttribute*) attributeFrom: (void*)data;

Creation of a new Attribute from libxml data.



Instances Methods

initWithNode:name:value:

- (id) initWithNode: (GSXMLNode*)node name: (NSString*)name value: (NSString*)value;

Create a new property carried by a node.


initFrom:

This is the designated initialiser
- (id) initFrom: (void*)data;

Creation of a new Attribute from libxml data.


lib

- (void*) lib;

Return pointer to xmlAttribute structure.


name

- (NSString*) name;

Return a Attribute name.


value

- (NSString*) value;

Return a value of this attribute.


next

- (GSXMLAttribute*) next;

Return next Attribute.

example


            id a = [node properties];
            NSLog(@"n1 property name - %@ value - %@", [a name], [a value]);
            while ((a = [a next]) != nil)
              {
                NSLog(@"n1 property name - %@ value - %@", [a name], [a value]);
              }

	     
 

prev

- (GSXMLAttribute*) prev;

Return previous Attribute.


type

- (int) type;

Return the numeric type code for this attribute.


typeDescription

- (NSString*) typeDescription;

Return the string type code for this attribute.