PHP xml_parser_create_ns() 함수
예시
네임스페이스를 지원하는 XML 파서를 생성합니다.
<?php
// Create an XML parser with namespace support
$parser=xml_parser_create_ns();
xml_parser_free($parser);
?>
정의 및 사용
xml_parser_create_ns() 함수는 네임스페이스를 지원하는 XML 파서를 생성합니다.
팁: xml 파서를 해제하려면 xml_parser_free() 함수를 사용하십시오.
팁: 네임스페이스 지원 없이 XML 파서를 생성하려면 대신 xml_parser_create() 함수를 사용하십시오.
통사론
xml_parser_create(encoding, separator)
매개변수 값
Parameter | Description |
---|---|
encoding | Optional. Specifies the character encoding for input/output in PHP 4. From PHP 5 it specifies the character encoding only for output. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1. From PHP 5.0.2, the default output charset is UTF-8. The possible values are ISO-8859-1, UTF-8 and US-ASCII |
separator | Optional. Specifies the output separator for tag name and namespace. Default is " : " |
기술적 세부 사항
반환 값: | 성공 시 다른 XML 함수에서 사용할 리소스 핸들입니다. 실패시 FALSE |
---|---|
PHP 버전: | 4.0.5+ |
❮ 완전한 PHP XML 참조