note 63936 added to function.xslt-process

From: Date: Tue, 04 Apr 2006 11:46:28 +0000
Subject: note 63936 added to function.xslt-process
Groups: php.notes 
Request: Send a blank email to php-notes+get-107278@lists.php.net to get a copy of this message
After experiencing an ”xml declaration not at start of external entity” error with XML recieved from a remote server. The server now sends response headers back and these were getting in the way. This fixed it: $fp = fsockopen($queryhost, 80); if($fp) { fputs($fp, $header); while(!feof($fp)) { $xml .= fgets($fp, 128); } } fclose($fp); //ensure string starts with the XML declaration. $xml = substr($xml, strpos($xml, “<?xml”) ); $xsltproc = xslt_create(); $result = xslt_process($xsltproc,‘arg:/_xml’, $xsltfile, NULL, array(‘/_xml’ => $xml)); ---- Server IP: 193.95.141.37 Probable Submitter: 82.141.243.194 (proxied: 1.1 HHPXY01) ---- X-Spam-Status: Yes, hits=7.4 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HEAD_ILLEGAL_CHARS autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.xslt-process.php Edit -- http://master.php.net/note/edit/63936 Del: integrated -- http://master.php.net/note/delete/63936/integrated Del: useless -- http://master.php.net/note/delete/63936/useless Del: bad code -- http://master.php.net/note/delete/63936/bad+code Del: spam -- http://master.php.net/note/delete/63936/spam Del: non-english -- http://master.php.net/note/delete/63936/non-english Del: in docs -- http://master.php.net/note/delete/63936/in+docs Del: other reasons-- http://master.php.net/note/delete/63936 Reject -- http://master.php.net/note/reject/63936 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107278) next »