Complete PHP XML Parser Reference Manual
For a complete reference manual on PHP XML Parser functions, please visit our PHP XML Parser Reference Manual.
Definition and Usage
The xml_parser_free() function frees the specified XML parser.
This function returns TRUE on success, and FALSE on failure.
Syntax
xml_parser_free(parser)
| Parameter | Description |
|---|---|
| parser | Required. Specifies the XML parser to be freed. |
Tips and Notes
Note: If the parser parameter does not refer to a valid parser, the function returns FALSE, otherwise it returns TRUE.
Example
<?php
$xmlParser = xml_parser_create();
// Perform some operations here...
// Now free the parser
xml_parser_free($xmlParser);
?>
Examples
The following example demonstrates how to free an XML parser.
<?php
$xmlParser = xml_parser_create();
// Perform some operations here...
// Now free the parser
if (xml_parser_free($xmlParser)) {
echo "XML parser freed successfully.";
} else {
echo "Failed to free XML parser.";
}
?>
Complete PHP XML Parser Reference Manual
For a complete reference manual on PHP XML Parser functions, please visit our PHP XML Parser Reference Manual.
YouTip