~ubuntu-branches/ubuntu/edgy/gnustep-base/edgy

« back to all changes in this revision

Viewing changes to Documentation/gsdoc/GSXMLDocument.gsdoc

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2004-04-06 15:21:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040406152111-95pwmfi50qp1s594
Tags: 1.9.1-2
* debian/rules: Update CC.
* Source/NSUserDefaults: apply patch from CVS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0"?>
2
 
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
3
 
<gsdoc base="GSXMLDocument" next="GSXMLParser" up="GSXML" prev="GSXMLAtrribute">
4
 
  <head>
5
 
    <title>GSXMLDocument</title>
6
 
    <author name="Michael Pakhantsov">
7
 
      <email address="mishel@berest.dp.ua"/>
8
 
    </author>
9
 
    <version>$Revision: 1.3 $</version>
10
 
    <date>$Date: 2001/03/03 09:58:53 $</date>
11
 
  </head>
12
 
 
13
 
  <body>
14
 
    <chapter>
15
 
      <heading>GSXMLDocument</heading>
16
 
      <class name="GSXMLDocument" super="NSObject">
17
 
        <declared>GSXML.h</declared>
18
 
          <desc>
19
 
          <p>
20
 
            XML Document.
21
 
          </p>
22
 
          </desc>
23
 
 
24
 
 
25
 
        <method type="GSXMLDocument*" factory="yes">
26
 
          <sel>documentWithVersion:</sel>
27
 
          <arg type="NSString*">version</arg>
28
 
          <desc>
29
 
            <p>
30
 
              Creation of a new XML document.
31
 
            </p>
32
 
 
33
 
            <example>
34
 
 
35
 
  id d = [GSXMLDocument documentWithVersion: @"1.0"];
36
 
 
37
 
  [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
38
 
  [[d root] setProp: @"version" value: @"0.9"];
39
 
  n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil];
40
 
  [n1 makeComment: @" this is a comment "];
41
 
  [n1 makePI: @"pi1" content: @"this is a process instruction"];
42
 
  [n1 makeChildWithNamespace: nil name: @"key" content: @"Year Of Birth"];
43
 
  [n1 makeChildWithNamespace: nil name: @"integer" content: @"65"];
44
 
  [n1 makeChildWithnamespace: nil name: @"key" content: @"Pets Names"];
45
 
 
46
 
            </example>
47
 
          </desc>
48
 
        </method>
49
 
 
50
 
        <method type="id">
51
 
          <sel>initWithVersion:</sel>
52
 
          <arg type="NSString*">version</arg>
53
 
          <desc>
54
 
          <p>
55
 
            Creation of a new XML document.
56
 
          </p>
57
 
          </desc>
58
 
        </method>
59
 
 
60
 
        <method type="GSXMLDocument*" factory="yes">
61
 
          <sel>documentFrom:</sel>
62
 
          <arg type="void*">data</arg>
63
 
          <desc>
64
 
            <p>
65
 
              Creation of a new Document from libxml data.
66
 
            </p>
67
 
          </desc>
68
 
        </method>
69
 
 
70
 
        <method type="id" init="yes">
71
 
          <sel>initFrom:</sel>
72
 
          <arg type="void*">data</arg>
73
 
          <desc>
74
 
          <p>
75
 
            Creation of a new Document from libxml data.
76
 
            </p>
77
 
          </desc>
78
 
        </method>
79
 
 
80
 
        <method type="NSString*">
81
 
          <sel>version</sel>
82
 
          <desc>
83
 
            <p>
84
 
              Return the version of document.
85
 
            </p>
86
 
          </desc>
87
 
        </method>
88
 
 
89
 
        <method type="NSString*">
90
 
          <sel>encoding</sel>
91
 
          <desc>
92
 
            <p>
93
 
              Return the encoding of document.
94
 
            </p>
95
 
          </desc>
96
 
        </method>
97
 
 
98
 
        <method type="void">
99
 
          <sel>save:</sel>
100
 
          <arg type="NSString*">filename</arg>
101
 
          <desc>
102
 
            <p>
103
 
              Save XML document.
104
 
            </p>
105
 
          </desc>
106
 
        </method>
107
 
 
108
 
        <method type="void*">
109
 
          <sel>lib</sel>
110
 
          <desc>
111
 
            <p>
112
 
              Return pointer to xmlDoc structure.
113
 
            </p>
114
 
          </desc>
115
 
        </method>
116
 
 
117
 
        <method type="GSXMLNode*">
118
 
          <sel>root</sel>
119
 
          <desc>
120
 
            <p>
121
 
              Return the root name of document.
122
 
            </p>
123
 
          </desc>
124
 
        </method>
125
 
 
126
 
        <method type="GSXMLNode*">
127
 
          <sel>setRoot:</sel>
128
 
          <arg type="GSXMLNode*">node</arg>
129
 
          <desc>
130
 
            <p>
131
 
              Set the root element of the document.
132
 
              Return the old root element.
133
 
            </p>
134
 
          </desc>
135
 
        </method>
136
 
 
137
 
        <method type="GSXMLDocument*">
138
 
          <sel>makeNodeWithNamespace:</sel>
139
 
          <arg type="GSXMLNamespace*">ns</arg>
140
 
          <sel>name:</sel>
141
 
          <arg type="NSString*">name</arg>
142
 
          <sel>content:</sel>
143
 
          <arg type="NSString*">content</arg>
144
 
          <desc>
145
 
            <p>
146
 
             Creation of a new node element within a document.
147
 
            </p>
148
 
            <example>
149
 
 
150
 
  GSXMLNode *n1, *n2;
151
 
  GSXMLDocument *d;
152
 
 
153
 
  d = [GSXMLDocument documentWithVersion: @"1.0"];
154
 
  [d setRoot: [d makeNodeWithNamespace: nil name: @"plist" content: nil]];
155
 
  [[d root] setProp: @"version" value: @"0.9"];
156
 
  n1 = [[d root] makeChildWithNamespace: nil name: @"dict" content: nil];
157
 
 
158
 
            </example>
159
 
          </desc>
160
 
        </method>
161
 
      </class>
162
 
    </chapter>
163
 
  </body>
164
 
</gsdoc>
165