mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-29 11:31:11 +00:00
168 lines
4.4 KiB
HTML
168 lines
4.4 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: 0.2</p>
|
||
|
<p>Date: 15 September, 2000</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-3">+namespaceFrom:</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-0">+namespaceWithNode:prefix:href:</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-7">-href</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-4">-initFrom:</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-2">-initWithNode:prefix:href:</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-5">-lib</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-9">-next</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-6">-prefix</a>
|
||
|
<li><a href="GSXMLNamespace.html#method-8">-type</a>
|
||
|
</ul>
|
||
|
<hr><h2>Class Methods</h2>
|
||
|
<h3><a name="method-0">namespaceWithNode:prefix:href:</a></h3>
|
||
|
+ (<A HREF="GSXMLNamespace.html#GSXMLNamespace">GSXMLNamespace</A>*) <b>namespaceWithNode:</b> (<A HREF="GSXMLNode.html#GSXMLNode">GSXMLNode</A>*)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-3">namespaceFrom:</a></h3>
|
||
|
+ (<A HREF="GSXMLNamespace.html#GSXMLNamespace">GSXMLNamespace</A>*) <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-2">initWithNode:prefix:href:</a></h3>
|
||
|
- (id) <b>initWithNode:</b> (<A HREF="GSXMLNode.html#GSXMLNode">GSXMLNode</A>*)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-4">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-5">lib</a></h3>
|
||
|
- (void*) <b>lib</b>;<br>
|
||
|
|
||
|
<p>
|
||
|
|
||
|
Return pointer to xmlNs structure.
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
<h3><a name="method-6">prefix</a></h3>
|
||
|
- (NSString*) <b>prefix</b>;<br>
|
||
|
|
||
|
<p>
|
||
|
|
||
|
Return namespace prefix.
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
<h3><a name="method-7">href</a></h3>
|
||
|
- (NSString*) <b>href</b>;<br>
|
||
|
|
||
|
<p>
|
||
|
|
||
|
Return namespace http reference.
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
<h3><a name="method-8">type</a></h3>
|
||
|
- (GSXMLNamespaceType) <b>type</b>;<br>
|
||
|
|
||
|
<p>
|
||
|
|
||
|
Return type of namespace.
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
<h3><a name="method-9">next</a></h3>
|
||
|
- (<A HREF="GSXMLNamespace.html#GSXMLNamespace">GSXMLNamespace</A>*) <b>next</b>;<br>
|
||
|
|
||
|
<p>
|
||
|
|
||
|
Return next namespace.
|
||
|
</p>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
</body>
|
||
|
|
||
|
</html>
|