[Up] [Next]

GSXMLNamespace

Authors

Michael Pakhantsov
Richard Frith-Macdonald

Version: 0.2

Date: 15 September, 2000

GSXMLNamespace

GSXMLNamespace

Declared in: GSXML.h

Inherits from: NSObject


XML namespace.

Instance Variables

Methods


Class Methods

namespaceWithNode:prefix:href:

+ (GSXMLNamespace*) namespaceWithNode: (GSXMLNode*)node prefix: (NSString*)prefix href: (NSString*)href;

Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node.

example


             ....
             GSXMLNamespace *ns1, *ns2;
             GSXMLNode *node1, *node2;
             NSString *prefix = @"mac-os-property";
             NSString *href   = @"http://www.gnustep.org/some/location";

             ns = [GSXMLNamespace namespaceWithNode: nil
                                               href: href
                                             prefix: prefix];
             node1 = [GSXMLNode nodeWithNamespace: ns name: @"node1"];

             node2 = [GSXMLNode nodeWithNamespace: nil name: @"node2"];
             ns2 = [GSXMLNamespace namespaceWithNode: node2
                                                href: href
                                              prefix: prefix];

             Result:

             node1   <mac-os-property:node1/>
             node2   <node2 xmlns="mac-os-property"/>
             

namespaceFrom:

+ (GSXMLNamespace*) namespaceFrom: (void*)data;

Creation of a new Namespace from libxml data.



Instances Methods

initWithNode:prefix:href:

- (id) initWithNode: (GSXMLNode*)node prefix: (NSString*)prefix href: (NSString*)href;

Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node.


initFrom:

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

Creation of a new Namespace from libxml data.


lib

- (void*) lib;

Return pointer to xmlNs structure.


prefix

- (NSString*) prefix;

Return namespace prefix.


href

- (NSString*) href;

Return namespace http reference.


type

- (GSXMLNamespaceType) type;

Return type of namespace.


next

- (GSXMLNamespace*) next;

Return next namespace.