#43622 [NEW]: Failed to parse document!
| From: | cj at dafolo dot dk | Date: | Tue, 18 Dec 2007 11:15:18 +0000 |
| Subject: | #43622 [NEW]: Failed to parse document! | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-120725@lists.php.net to get a copy of this message | ||
From: cj at dafolo dot dk
Operating system: FreeBSD
PHP version: 5.2.5
PHP Bug Type: SimpleXML related
Bug description: Failed to parse document!
Description:
------------
Failed to parse document with namespace
Reproduce code:
---------------
<?xml version="1.0" encoding="utf-8"?>
<Root
xmlns:edoclist="http://www.fujitsu.dk/esdh/xml/schemas/2007/01/14/">
<edoclist:ArchiveFormats>
<edoclist:ArchiveFormat>
<edoclist:ArchiveFormatCode>1</edoclist:ArchiveFormatCode>
<edoclist:ArchiveFormatFileExtension>DOC</edoclist:ArchiveFormatFileExtension>
<edoclist:ArchiveFormatMimetype>application/msword</edoclist:ArchiveFormatMimetype>
</edoclist:ArchiveFormat>
</edoclist:ArchiveFormats>
</Root>
$string =
file_get_contents('http://mygreeceholiday.discoball.pil.dk/webservice/ArchiveFormat-result.xml');
$document = simplexml_load_string($string);
if (!$document){
echo "Failed to parse document!\n";
}
else{
print_r($document);
}
--
Edit bug report at http://bugs.php.net/?id=43622&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43622&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43622&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43622&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43622&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43622&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43622&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43622&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43622&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43622&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43622&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43622&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43622&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43622&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43622&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43622&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43622&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43622&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43622&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43622&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43622&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43622&r=mysqlcfg