xml parser create in PHP
In this article I will explain how the xml_parser_create() function can be used in PHP.
xml_parser_create() function in PHP
- The xml_parser_create() function is used to create an new XML parser.
- The xml_parser_create() function returns a resource handle to be used by other XML functions on success..
- The xml_parser_create() function returns FALSE on failure.
Syntax
xml_parser_create(encoding,separator) |
Parameter
-
encoding encoding is required parameter. it is specify for the output encoding. This is the default value. Possible values:
- ISO-8859-1
- UTF-8
- US-ASCII
- separator separator is optional parameter. it is specify for the output separator for tag name and namespace. Default value of separator is " : ".
Example
The following example show to how the xml_parser_create() function can be used in PHP.
<html>
<body>
<h3 style="color: blue;">xml_parser_create() function example in PHP</h3>
<?php
$xmlparser = xml_parser_create();
echo"xml_parser is created<br/>";
xml_parser_free($xmlparser);
echo("Now xml_parser free....!");
?>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here