PHP Function XML Parser Create Ns
php function xml_parser_create_ns() is used to create an XML parser with namespace support in PHP. This is useful when you need to parse XML files that contain namespace declarations or when you are using the SimpleXML library or other XML parsing libraries in PHP. It returns a resource handle to be used by other XML functions on success, or FALSE on failure.
You can use a number of different XML parsers with PHP, but the XML parser built into PHP is often the best option. It is lightweight, supports all XML features, and is very fast. The XML parser can be replaced with an external one if you need more functionality such as a Java parser or Saxon from Apache.
The XML parser in PHP also supports diacritics, so it can be used with internationalized domain names (IDNs). However, if you are working with IDNs and need to support both ISO-8859-1 and UTF-8, you will have to pass a string argument as well. This will cause PHP 4 to autodetect the format whereas PHP 5 will assume that the input is ISO-8859-1 and choke on the byte order marker of UTF-8 files.
The optional encoding parameter specifies the character encoding for the input/output. In PHP 4, the encoding is automatically detected, so this parameter only specifies the output encoding. The supported encodings are ISO-8859-1, UTF-8 and US-ASCII. The $separator argument specifies the output separator for tag name and namespace. The default value is ':'.