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 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
|
<?php
// Start of xml v.
/**
* Create an XML parser
* @link http://www.php.net/manual/en/function.xml-parser-create.php
* @param encoding string[optional] <p>
* The optional encoding specifies the character
* encoding for the input/output in PHP 4. Starting from PHP 5, the input
* encoding is automatically detected, so that the
* encoding parameter specifies only the output
* encoding. In PHP 4, the default output encoding is the same as the
* input charset. If empty string is passed, the parser attempts to identify
* which encoding the document is encoded in by looking at the heading 3 or
* 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is
* ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
* encodings are ISO-8859-1, UTF-8 and
* US-ASCII.
* </p>
* @return resource a resource handle for the new XML parser.
*/
function xml_parser_create ($encoding = null) {}
/**
* Create an XML parser with namespace support
* @link http://www.php.net/manual/en/function.xml-parser-create-ns.php
* @param encoding string[optional] <p>
* The optional encoding specifies the character
* encoding for the input/output in PHP 4. Starting from PHP 5, the input
* encoding is automatically detected, so that the
* encoding parameter specifies only the output
* encoding. In PHP 4, the default output encoding is the same as the
* input charset. In PHP 5.0.0 and 5.0.1, the default output charset is
* ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
* encodings are ISO-8859-1, UTF-8 and
* US-ASCII.
* </p>
* @param separator string[optional] <p>
* With a namespace aware parser tag parameters passed to the various
* handler functions will consist of namespace and tag name separated by
* the string specified in separator.
* </p>
* @return resource a resource handle for the new XML parser.
*/
function xml_parser_create_ns ($encoding = null, $separator = null) {}
/**
* Use XML Parser within an object
* @link http://www.php.net/manual/en/function.xml-set-object.php
* @param parser resource <p>
* A reference to the XML parser to use inside the object.
* </p>
* @param object object <p>
* The object where to use the XML parser.
* </p>
* @return bool Returns true on success, false on failure.
*/
function xml_set_object ($parser, &$object) {}
/**
* Set up start and end element handlers
* @link http://www.php.net/manual/en/function.xml-set-element-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up start and end element handler functions.
* </p>
* @param start_element_handler callable <p>
* The function named by start_element_handler
* must accept three parameters:
*
* start_element_handler
* resourceparser
* stringname
* arrayattribs
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @param end_element_handler callable <p>
* The function named by end_element_handler
* must accept two parameters:
*
* end_element_handler
* resourceparser
* stringname
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_element_handler ($parser, $start_element_handler, $end_element_handler) {}
/**
* Set up character data handler
* @link http://www.php.net/manual/en/function.xml-set-character-data-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up character data handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* two parameters:
*
* handler
* resourceparser
* stringdata
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_character_data_handler ($parser, $handler) {}
/**
* Set up processing instruction (PI) handler
* @link http://www.php.net/manual/en/function.xml-set-processing-instruction-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up processing instruction (PI) handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* three parameters:
*
* handler
* resourceparser
* stringtarget
* stringdata
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_processing_instruction_handler ($parser, $handler) {}
/**
* Set up default handler
* @link http://www.php.net/manual/en/function.xml-set-default-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up default handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* two parameters:
*
* handler
* resourceparser
* stringdata
*
*
*
*
* parser
*
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_default_handler ($parser, $handler) {}
/**
* Set up unparsed entity declaration handler
* @link http://www.php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up unparsed entity declaration handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept six
* parameters:
*
* handler
* resourceparser
* stringentity_name
* stringbase
* stringsystem_id
* stringpublic_id
* stringnotation_name
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the
* handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_unparsed_entity_decl_handler ($parser, $handler) {}
/**
* Set up notation declaration handler
* @link http://www.php.net/manual/en/function.xml-set-notation-decl-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up notation declaration handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* five parameters:
*
* handler
* resourceparser
* stringnotation_name
* stringbase
* stringsystem_id
* stringpublic_id
*
*
*
*
* parser
*
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_notation_decl_handler ($parser, $handler) {}
/**
* Set up external entity reference handler
* @link http://www.php.net/manual/en/function.xml-set-external-entity-ref-handler.php
* @param parser resource <p>
* A reference to the XML parser to set up external entity reference handler function.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* five parameters, and should return an integer value.If the
* value returned from the handler is false (which it will be if no
* value is returned), the XML parser will stop parsing and
* xml_get_error_code will return
* XML_ERROR_EXTERNAL_ENTITY_HANDLING.
*
* handler
* resourceparser
* stringopen_entity_names
* stringbase
* stringsystem_id
* stringpublic_id
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_external_entity_ref_handler ($parser, $handler) {}
/**
* Set up start namespace declaration handler
* @link http://www.php.net/manual/en/function.xml-set-start-namespace-decl-handler.php
* @param parser resource <p>
* A reference to the XML parser.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* three parameters, and should return an integer value. If the
* value returned from the handler is false (which it will be if no
* value is returned), the XML parser will stop parsing and
* xml_get_error_code will return
* XML_ERROR_EXTERNAL_ENTITY_HANDLING.
*
* handler
* resourceparser
* stringprefix
* stringuri
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_start_namespace_decl_handler ($parser, $handler) {}
/**
* Set up end namespace declaration handler
* @link http://www.php.net/manual/en/function.xml-set-end-namespace-decl-handler.php
* @param parser resource <p>
* A reference to the XML parser.
* </p>
* @param handler callable <p>
* handler is a string containing the name of a
* function that must exist when xml_parse is called
* for parser.
* </p>
* <p>
* The function named by handler must accept
* two parameters, and should return an integer value. If the
* value returned from the handler is false (which it will be if no
* value is returned), the XML parser will stop parsing and
* xml_get_error_code will return
* XML_ERROR_EXTERNAL_ENTITY_HANDLING.
*
* handler
* resourceparser
* stringprefix
*
*
*
* parser
*
*
* The first parameter, parser, is a
* reference to the XML parser calling the handler.
* @return bool Returns true on success, false on failure.
*/
function xml_set_end_namespace_decl_handler ($parser, $handler) {}
/**
* Start parsing an XML document
* @link http://www.php.net/manual/en/function.xml-parse.php
* @param parser resource <p>
* A reference to the XML parser to use.
* </p>
* @param data string <p>
* Chunk of data to parse. A document may be parsed piece-wise by
* calling xml_parse several times with new data,
* as long as the is_final parameter is set and
* true when the last data is parsed.
* </p>
* @param is_final bool[optional] <p>
* If set and true, data is the last piece of
* data sent in this parse.
* </p>
* @return int 1 on success or 0 on failure.
* </p>
* <p>
* For unsuccessful parses, error information can be retrieved with
* xml_get_error_code,
* xml_error_string,
* xml_get_current_line_number,
* xml_get_current_column_number and
* xml_get_current_byte_index.
* </p>
*
* <p>
* Entity errors are reported at the end of the data thus only if
* is_final is set and true.
*/
function xml_parse ($parser, $data, $is_final = null) {}
/**
* Parse XML data into an array structure
* @link http://www.php.net/manual/en/function.xml-parse-into-struct.php
* @param parser resource <p>
* A reference to the XML parser.
* </p>
* @param data string <p>
* A string containing the XML data.
* </p>
* @param values array <p>
* An array containing the values of the XML data
* </p>
* @param index array[optional] <p>
* An array containing pointers to the location of the appropriate values in the $values.
* </p>
* @return int xml_parse_into_struct returns 0 for failure and 1 for
* success. This is not the same as false and true, be careful with
* operators such as ===.
*/
function xml_parse_into_struct ($parser, $data, array &$values, array &$index = null) {}
/**
* Get XML parser error code
* @link http://www.php.net/manual/en/function.xml-get-error-code.php
* @param parser resource <p>
* A reference to the XML parser to get error code from.
* </p>
* @return int This function returns false if parser does
* not refer to a valid parser, or else it returns one of the error
* codes listed in the error codes
* section.
*/
function xml_get_error_code ($parser) {}
/**
* Get XML parser error string
* @link http://www.php.net/manual/en/function.xml-error-string.php
* @param code int <p>
* An error code from xml_get_error_code.
* </p>
* @return string a string with a textual description of the error
* code, or false if no description was found.
*/
function xml_error_string ($code) {}
/**
* Get current line number for an XML parser
* @link http://www.php.net/manual/en/function.xml-get-current-line-number.php
* @param parser resource <p>
* A reference to the XML parser to get line number from.
* </p>
* @return int This function returns false if parser does
* not refer to a valid parser, or else it returns which line the
* parser is currently at in its data buffer.
*/
function xml_get_current_line_number ($parser) {}
/**
* Get current column number for an XML parser
* @link http://www.php.net/manual/en/function.xml-get-current-column-number.php
* @param parser resource <p>
* A reference to the XML parser to get column number from.
* </p>
* @return int This function returns false if parser does
* not refer to a valid parser, or else it returns which column on
* the current line (as given by
* xml_get_current_line_number) the parser is
* currently at.
*/
function xml_get_current_column_number ($parser) {}
/**
* Get current byte index for an XML parser
* @link http://www.php.net/manual/en/function.xml-get-current-byte-index.php
* @param parser resource <p>
* A reference to the XML parser to get byte index from.
* </p>
* @return int This function returns false if parser does
* not refer to a valid parser, or else it returns which byte index
* the parser is currently at in its data buffer (starting at 0).
*/
function xml_get_current_byte_index ($parser) {}
/**
* Free an XML parser
* @link http://www.php.net/manual/en/function.xml-parser-free.php
* @param parser resource A reference to the XML parser to free.
* @return bool This function returns false if parser does not
* refer to a valid parser, or else it frees the parser and returns true.
*/
function xml_parser_free ($parser) {}
/**
* Set options in an XML parser
* @link http://www.php.net/manual/en/function.xml-parser-set-option.php
* @param parser resource <p>
* A reference to the XML parser to set an option in.
* </p>
* @param option int <p>
* Which option to set. See below.
* </p>
* <p>
* The following options are available:
* <table>
* XML parser options
*
*
* <tr valign="top">
* <td>Option constant</td>
* <td>Data type</td>
* <td>Description</td>
* </tr>
*
*
* <tr valign="top">
* <td>XML_OPTION_CASE_FOLDING</td>
* <td>integer</td>
* <td>
* Controls whether case-folding is enabled for this
* XML parser. Enabled by default.
* </td>
* </tr>
* <tr valign="top">
* <td>XML_OPTION_SKIP_TAGSTART</td>
* <td>integer</td>
* <td>
* Specify how many characters should be skipped in the beginning of a
* tag name.
* </td>
* </tr>
* <tr valign="top">
* <td>XML_OPTION_SKIP_WHITE</td>
* <td>integer</td>
* <td>
* Whether to skip values consisting of whitespace characters.
* </td>
* </tr>
* <tr valign="top">
* <td>XML_OPTION_TARGET_ENCODING</td>
* <td>string</td>
* <td>
* Sets which target encoding to
* use in this XML parser.By default, it is set to the same as the
* source encoding used by xml_parser_create.
* Supported target encodings are ISO-8859-1,
* US-ASCII and UTF-8.
* </td>
* </tr>
*
*
* </table>
* </p>
* @param value mixed <p>
* The option's new value.
* </p>
* @return bool This function returns false if parser does not
* refer to a valid parser, or if the option could not be set. Else the
* option is set and true is returned.
*/
function xml_parser_set_option ($parser, $option, $value) {}
/**
* Get options from an XML parser
* @link http://www.php.net/manual/en/function.xml-parser-get-option.php
* @param parser resource A reference to the XML parser to get an option from.
* @param option int Which option to fetch. XML_OPTION_CASE_FOLDING
* and XML_OPTION_TARGET_ENCODING are available.
* See xml_parser_set_option for their description.
* @return mixed This function returns false if parser does
* not refer to a valid parser or if option isn't
* valid (generates also a E_WARNING).
* Else the option's value is returned.
*/
function xml_parser_get_option ($parser, $option) {}
/**
* Encodes an ISO-8859-1 string to UTF-8
* @link http://www.php.net/manual/en/function.utf8-encode.php
* @param data string <p>
* An ISO-8859-1 string.
* </p>
* @return string the UTF-8 translation of data.
*/
function utf8_encode ($data) {}
/**
* Converts a string with ISO-8859-1 characters encoded with UTF-8
to single-byte ISO-8859-1
* @link http://www.php.net/manual/en/function.utf8-decode.php
* @param data string <p>
* An UTF-8 encoded string.
* </p>
* @return string the ISO-8859-1 translation of data.
*/
function utf8_decode ($data) {}
define ('XML_ERROR_NONE', 0);
define ('XML_ERROR_NO_MEMORY', 1);
define ('XML_ERROR_SYNTAX', 2);
define ('XML_ERROR_NO_ELEMENTS', 3);
define ('XML_ERROR_INVALID_TOKEN', 4);
define ('XML_ERROR_UNCLOSED_TOKEN', 5);
define ('XML_ERROR_PARTIAL_CHAR', 6);
define ('XML_ERROR_TAG_MISMATCH', 7);
define ('XML_ERROR_DUPLICATE_ATTRIBUTE', 8);
define ('XML_ERROR_JUNK_AFTER_DOC_ELEMENT', 9);
define ('XML_ERROR_PARAM_ENTITY_REF', 10);
define ('XML_ERROR_UNDEFINED_ENTITY', 11);
define ('XML_ERROR_RECURSIVE_ENTITY_REF', 12);
define ('XML_ERROR_ASYNC_ENTITY', 13);
define ('XML_ERROR_BAD_CHAR_REF', 14);
define ('XML_ERROR_BINARY_ENTITY_REF', 15);
define ('XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', 16);
define ('XML_ERROR_MISPLACED_XML_PI', 17);
define ('XML_ERROR_UNKNOWN_ENCODING', 18);
define ('XML_ERROR_INCORRECT_ENCODING', 19);
define ('XML_ERROR_UNCLOSED_CDATA_SECTION', 20);
define ('XML_ERROR_EXTERNAL_ENTITY_HANDLING', 21);
define ('XML_OPTION_CASE_FOLDING', 1);
define ('XML_OPTION_TARGET_ENCODING', 2);
define ('XML_OPTION_SKIP_TAGSTART', 3);
define ('XML_OPTION_SKIP_WHITE', 4);
/**
* Holds the SAX implementation method.
* Can be libxml or expat.
* @link http://www.php.net/manual/en/xml.constants.php
*/
define ('XML_SAX_IMPL', "libxml");
// End of xml v.
?>
|