note 36742 modified in function.domdocument-create-processing-instruction by didou
| From: | didou@php.net | Date: | Tue, 21 Oct 2003 07:27:06 +0000 |
| Subject: | note 36742 modified in function.domdocument-create-processing-instruction by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58966@lists.php.net to get a copy of this message | ||
The documentation is wrong. It takes two arguments as noted by rj kamp, but the given example was
incorrect, resulting in:
<? xsl-stylesheet type="text/xsl" href="path_to_my_stylesheet"?>
(not a valid pi because of the leading space)
The correct usage is:
string DomDocument->create_processing_instruction (string pi_type, string pi_content)
as in:
$pi = $myDoc->create_processing_instruction('xml:stylesheet',
'type="text/xsl" href="path_to_my_stylesheet"');
--was--
The documentation is wrong. It takes two arguments as noted by rj kamp, but the given example was
incorrect, resulting in:
<? xsl-stylesheet type="text/xsl" href="path_to_my_stylesheet"?>
(not a valid pi because of the leading space)
The correct usage is:
string DomDocument->create_processing_instruction (string pi_type, string pi_content)
as in:
$pi = $myDoc->create_processing_instruction('xml:stylesheet',
'type="text/xsl" href="path_to_my_stylesheet"');
http://www.php.net/manual/en/function.domdocument-create-processing-instruction.php