mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9698 72102866-910b-0410-8b05-ffd578937521
208 lines
5.2 KiB
HTML
208 lines
5.2 KiB
HTML
<html><head>
|
|
<title>GSXMLNamespace</title>
|
|
</head>
|
|
<body>
|
|
<a href ="GSXML.html">[Up] </a>
|
|
<a href ="GSXMLNode.html">[Next] </a>
|
|
<h1>GSXMLNamespace</h1>
|
|
<h3>Authors </h3>
|
|
<dl>
|
|
<dt>Michael Pakhantsov
|
|
<dd>
|
|
<dt>Richard Frith-Macdonald
|
|
<dd>
|
|
</dl>
|
|
<p>Version: $Revision$</p>
|
|
<p>Date: $Date$</p>
|
|
<h2><a name ="cont-0">GSXMLNamespace</a></h2>
|
|
<h2><a name ="GSXMLNamespace">GSXMLNamespace</a></h2>
|
|
<p><b>Declared in: </b> GSXML.h</p>
|
|
<p><b>Inherits from: </b> NSObject</p>
|
|
<hr>
|
|
|
|
XML namespace.
|
|
|
|
<h2>Instance Variables </h2>
|
|
<ul>
|
|
</ul>
|
|
<h2>Methods </h2>
|
|
<ul>
|
|
<li ><a href ="GSXMLNamespace.html#method-2">+descriptionFromType:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-5">+namespaceFrom:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-0">+namespaceWithNode:prefix:href:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-3">+typeFromDescription:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-9">-href</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-6">-initFrom:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-4">-initWithNode:prefix:href:</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-7">-lib</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-10">-next</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-8">-prefix</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-11">-type</a>
|
|
<li ><a href ="GSXMLNamespace.html#method-12">-typeDescription</a>
|
|
</ul>
|
|
<hr><h2>Class Methods </h2>
|
|
<h3><a name ="method-0">namespaceWithNode:prefix:href:</a></h3>
|
|
+ (GSXMLNamespace*) <b>namespaceWithNode:</b> (GSXMLNode*)node <b>prefix:</b> (NSString*)prefix <b>href:</b> (NSString*)href;<br>
|
|
|
|
<p>
|
|
|
|
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.
|
|
</p>
|
|
|
|
<a name ="label-1">example </a>
|
|
<pre>
|
|
|
|
|
|
....
|
|
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"/>
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-2">descriptionFromType:</a></h3>
|
|
+ (NSString*) <b>descriptionFromType:</b> (int)type;<br>
|
|
|
|
<p>
|
|
|
|
Return the string constant value for the namespace
|
|
type given.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-3">typeFromDescription:</a></h3>
|
|
+ (int) <b>typeFromDescription:</b> (NSString*)desc;<br>
|
|
|
|
<p>
|
|
|
|
Return the numeric constant value for the namespace
|
|
type named. This method is inefficient, so the returned
|
|
value should be saved for re-use later. The possible
|
|
values are -
|
|
</p>
|
|
|
|
<ul>
|
|
<li >XML_LOCAL_NAMESPACE
|
|
</ul>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-5">namespaceFrom:</a></h3>
|
|
+ (GSXMLNamespace*) <b>namespaceFrom:</b> (void*)data;<br>
|
|
|
|
<p>
|
|
|
|
Creation of a new Namespace from libxml data.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<hr><h2>Instances Methods </h2>
|
|
<h3><a name ="method-4">initWithNode:prefix:href:</a></h3>
|
|
- (id) <b>initWithNode:</b> (GSXMLNode*)node <b>prefix:</b> (NSString*)prefix <b>href:</b> (NSString*)href;<br>
|
|
|
|
<p>
|
|
|
|
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.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-6">initFrom:</a></h3>
|
|
<b>This is the designated initialiser </b><br>
|
|
- (id) <b>initFrom:</b> (void*)data;<br>
|
|
|
|
<p>
|
|
|
|
Creation of a new Namespace from libxml data.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-7">lib</a></h3>
|
|
- (void*) <b>lib</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return pointer to xmlNs structure.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-8">prefix</a></h3>
|
|
- (NSString*) <b>prefix</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return namespace prefix.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-9">href</a></h3>
|
|
- (NSString*) <b>href</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return namespace http reference.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-10">next</a></h3>
|
|
- (GSXMLNamespace*) <b>next</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return next namespace.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-11">type</a></h3>
|
|
- (int) <b>type</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return numeric type code of namespace.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
<h3><a name ="method-12">typeDescription</a></h3>
|
|
- (NSString*) <b>typeDescription</b>;<br>
|
|
|
|
<p>
|
|
|
|
Return string type code of namespace.
|
|
</p>
|
|
|
|
|
|
<hr>
|
|
</body>
|
|
|
|
</html>
|