note 64268 deleted from function.domdocument-create-processing-instruction by bjori

From: Date: Tue, 11 Apr 2006 11:40:28 +0000
Subject: note 64268 deleted from function.domdocument-create-processing-instruction by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107758@lists.php.net to get a copy of this message
Note Submitter: Reason: in docs ---- i,m creating an xml document using php, i want include a xsl style sheet in the code. all i need is to add this line so it can be associated with the style sheet <?xml-stylesheet type="text/xsl" href="stylesheetname.xsl"?> here is the code: $doc = new_xmldoc('1.0'); $pi = $doc->create_processing_instruction( "xsl-stylesheet", "type=\"text/xsl\" href=\"$stylesheet\""); $doc->append_child($pi); can someone please verify $root = $doc->add_root('rows'); $member = $root->new_child('wes_ica2',''); $member->new_child('id','John'); $member->new_child('county_UA','Adams'); $member->new_child('pop_code','3400'); $member->new_child('favourite_instrument','Debra'); $member = $root->new_child('wes_ica7',''); $member->new_child('id','Hones'); $member->new_child('fruit','2400'); $member->new_child('prizes','Jake'); $member->new_child('fguk_code','Tudor'); $member->new_child('fgeu_code','1200'); $fp = @fopen('beep.xml','w'); if(!$fp) { die('Error XML file not Updated'); } fwrite($fp,$doc->dumpmem()); fclose($fp);

« previous php.notes (#107758) next »