-
Notifications
You must be signed in to change notification settings - Fork 7
/
xmlreader.php
322 lines (293 loc) · 10.1 KB
/
xmlreader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?php
// Start of xmlreader v.7.0.4-7ubuntu2
/**
* The XMLReader extension is an XML Pull parser. The reader acts as a
* cursor going forward on the document stream and stopping at each node
* on the way.
* @link http://php.net/manual/en/class.xmlreader.php
*/
class XMLReader {
const NONE = 0;
const ELEMENT = 1;
const ATTRIBUTE = 2;
const TEXT = 3;
const CDATA = 4;
const ENTITY_REF = 5;
const ENTITY = 6;
const PI = 7;
const COMMENT = 8;
const DOC = 9;
const DOC_TYPE = 10;
const DOC_FRAGMENT = 11;
const NOTATION = 12;
const WHITESPACE = 13;
const SIGNIFICANT_WHITESPACE = 14;
const END_ELEMENT = 15;
const END_ENTITY = 16;
const XML_DECLARATION = 17;
const LOADDTD = 1;
const DEFAULTATTRS = 2;
const VALIDATE = 3;
const SUBST_ENTITIES = 4;
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Close the XMLReader input
* @link http://php.net/manual/en/xmlreader.close.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function close(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Get the value of a named attribute
* @link http://php.net/manual/en/xmlreader.getattribute.php
* @param string $name <p>
* The name of the attribute.
* </p>
* @return string The value of the attribute, or <b>NULL</b> if no attribute with the given
* <i>name</i> is found or not positioned on an element node.
*/
public function getAttribute(string $name): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Get the value of an attribute by index
* @link http://php.net/manual/en/xmlreader.getattributeno.php
* @param int $index <p>
* The position of the attribute.
* </p>
* @return string The value of the attribute, or an empty string (before PHP 5.6) or <b>NULL</b>
* (from PHP 5.6 onwards) if no attribute exists at
* <i>index</i> or is not positioned on the element.
*/
public function getAttributeNo(int $index): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Get the value of an attribute by localname and URI
* @link http://php.net/manual/en/xmlreader.getattributens.php
* @param string $localName <p>
* The local name.
* </p>
* @param string $namespaceURI <p>
* The namespace URI.
* </p>
* @return string The value of the attribute, or an empty string (before PHP 5.6) or <b>NULL</b>
* (from PHP 5.6 onwards) if no attribute with the given
* <i>localName</i> and <i>namespaceURI</i> is
* found or not positioned of element.
*/
public function getAttributeNs(string $localName, string $namespaceURI): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Indicates if specified property has been set
* @link http://php.net/manual/en/xmlreader.getparserproperty.php
* @param int $property <p>
* One of the parser option
* constants.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function getParserProperty(int $property): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Indicates if the parsed document is valid
* @link http://php.net/manual/en/xmlreader.isvalid.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function isValid(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Lookup namespace for a prefix
* @link http://php.net/manual/en/xmlreader.lookupnamespace.php
* @param string $prefix <p>
* String containing the prefix.
* </p>
* @return string <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function lookupNamespace(string $prefix): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Move cursor to an attribute by index
* @link http://php.net/manual/en/xmlreader.movetoattributeno.php
* @param int $index <p>
* The position of the attribute.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function moveToAttributeNo(int $index): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Move cursor to a named attribute
* @link http://php.net/manual/en/xmlreader.movetoattribute.php
* @param string $name <p>
* The name of the attribute.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function moveToAttribute(string $name): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Move cursor to a named attribute
* @link http://php.net/manual/en/xmlreader.movetoattributens.php
* @param string $localName <p>
* The local name.
* </p>
* @param string $namespaceURI <p>
* The namespace URI.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function moveToAttributeNs(string $localName, string $namespaceURI): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Position cursor on the parent Element of current Attribute
* @link http://php.net/manual/en/xmlreader.movetoelement.php
* @return bool <b>TRUE</b> if successful and <b>FALSE</b> if it fails or not positioned on
* Attribute when this method is called.
*/
public function moveToElement(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Position cursor on the first Attribute
* @link http://php.net/manual/en/xmlreader.movetofirstattribute.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function moveToFirstAttribute(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Position cursor on the next Attribute
* @link http://php.net/manual/en/xmlreader.movetonextattribute.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function moveToNextAttribute(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Set the URI containing the XML to parse
* @link http://php.net/manual/en/xmlreader.open.php
* @param string $URI <p>
* URI pointing to the document.
* </p>
* @param string $encoding [optional] <p>
* The document encoding or <b>NULL</b>.
* </p>
* @param int $options [optional] <p>
* A bitmask of the LIBXML_*
* constants.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. If called statically, returns an
* <b>XMLReader</b> or <b>FALSE</b> on failure.
*/
public function open(string $URI, string $encoding = null, int $options = 0): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Move to next node in document
* @link http://php.net/manual/en/xmlreader.read.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function read(): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Move cursor to next node skipping all subtrees
* @link http://php.net/manual/en/xmlreader.next.php
* @param string $localname [optional] <p>
* The name of the next node to move to.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function next(string $localname = null): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7)<br/>
* Retrieve XML from current node
* @link http://php.net/manual/en/xmlreader.readinnerxml.php
* @return string the contents of the current node as a string. Empty string on failure.
*/
public function readInnerXml(): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7)<br/>
* Retrieve XML from current node, including it self
* @link http://php.net/manual/en/xmlreader.readouterxml.php
* @return string the contents of current node, including itself, as a string. Empty string on failure.
*/
public function readOuterXml(): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7)<br/>
* Reads the contents of the current node as a string
* @link http://php.net/manual/en/xmlreader.readstring.php
* @return string the content of the current node as a string. Empty string on
* failure.
*/
public function readString(): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7)<br/>
* Validate document against XSD
* @link http://php.net/manual/en/xmlreader.setschema.php
* @param string $filename <p>
* The filename of the XSD schema.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setSchema(string $filename): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Set parser options
* @link http://php.net/manual/en/xmlreader.setparserproperty.php
* @param int $property <p>
* One of the parser option
* constants.
* </p>
* @param bool $value <p>
* If set to <b>TRUE</b> the option will be enabled otherwise will
* be disabled.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setParserProperty(int $property, bool $value): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7)<br/>
* Set the filename or URI for a RelaxNG Schema
* @link http://php.net/manual/en/xmlreader.setrelaxngschema.php
* @param string $filename <p>
* filename or URI pointing to a RelaxNG Schema.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setRelaxNGSchema(string $filename): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Set the data containing a RelaxNG Schema
* @link http://php.net/manual/en/xmlreader.setrelaxngschemasource.php
* @param string $source <p>
* String containing the RelaxNG Schema.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setRelaxNGSchemaSource(string $source): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Set the data containing the XML to parse
* @link http://php.net/manual/en/xmlreader.xml.php
* @param string $source <p>
* String containing the XML to be parsed.
* </p>
* @param string $encoding [optional] <p>
* The document encoding or <b>NULL</b>.
* </p>
* @param int $options [optional] <p>
* A bitmask of the LIBXML_*
* constants.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. If called statically, returns an
* <b>XMLReader</b> or <b>FALSE</b> on failure.
*/
public function XML(string $source, string $encoding = null, int $options = 0): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Returns a copy of the current node as a DOM object
* @link http://php.net/manual/en/xmlreader.expand.php
* @param DOMNode $basenode [optional] <p>
* A <b>DOMNode</b> defining the target <b>DOMDocument</b> for the created DOM object.
* </p>
* @return DOMNode The resulting <b>DOMNode</b> or <b>FALSE</b> on error.
*/
public function expand(DOMNode $basenode = null): DOMNode {}
}
// End of xmlreader v.7.0.4-7ubuntu2
?>