ID: 32712 Comment by: bruno dot baketaric at wob dot ag Reported By: bmuller at milchstrasse dot de Status: No Feedback Bug Type: DOM XML related Operating System: RedHat Linux 2.4.21-4.EL PHP Version: 5.0.4 New Comment:
running strval() does not work - at least in PHP 4.3.11 Previous Comments: ------------------------------------------------------------------------ [2005-05-11 03:29:00] mrc at linuxplatform dot org For a temp solution, run strval() on your XML buffer. ------------------------------------------------------------------------ [2005-04-23 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-04-15 14:16:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-04-15 09:23:44] bmuller at milchstrasse dot de Description: ------------ We develop a contentsystem to access Adobe InCopy Documents out of a Primebase Database. To read and parse the AIC (Adobe InCopy Document Format) we use the DOM XML extension. UNfortunatly after reading the CLOB/BLOB out of the database an loading it via DOM XML ($dom->loadXML($string), PHP throws the warning "Extra content at the end of the document". Not all the time, but irreguarly. If I read the the BLOB, write it in a temp textfile and then read it via $dom->load($filename), everything works fine. I have checked several times, the data out of the database is _always_ the same amd the XML is wellformed. Is there a memory leak in the loadXML method? Reproduce code: --------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <aic:document xmlns:aic="http://ns.adobe.com/AdobeInCopy/2.0/" name="Hier steht eine Bildunterschrift für Bildbreite 65" ver="3.0"> <aic:story xml:space="preserve" track="0" dFont="Times" optalign="0" optsize="40280000 0"><aic:pstyle name="B_BU"/><aic:cstyle name="[No character style]"/>NEU!!!! Hier steht eine Bildunterschrift für Bildbreite 65,5</aic:story> </aic:document> [...] primebase_cursor_bind($result, 0,PRIMEBASE_BLOB); while ($line = primebase_fetch_array($result)) { $aicdocument = primebase_read_blob($line[content]); $dom = new DOMDocument; $dom->loadXML($aicdocument); } echo htmlspecialchars(utf8_decode($dom->saveXML())); [...] Expected result: ---------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <aic:document xmlns:aic="http://ns.adobe.com/AdobeInCopy/2.0/" name="Hier steht eine Bildunterschrift für Bildbreite 65" ver="3.0"> <aic:story xml:space="preserve" track="0" dFont="Times" optalign="0" optsize="40280000 0"><aic:pstyle name="B_BU"/><aic:cstyle name="[No character style]"/>NEU!!!! Hier steht eine Bildunterschrift für Bildbreite 65,5</aic:story> </aic:document> Actual result: -------------- Warning: DOMDocument::loadXML() [function.loadXML]: Extra content at the end of the document in Entity, line: 6 in /usr/local/dreams/htdocs/k4_table_info.php on line 34 <?xml version="1.0"?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32712&edit=1