From:             sveta at microbecal dot com
Operating system: Windows XP
PHP version:      5CVS-2004-10-29 (dev)
PHP Bug Type:     SimpleXML related
Bug description:  I can't get attributes of nodes, when I use XML document with 
namespace definit

Description:
------------
When I use XML document with namespace definitions, I can't get attributes
of nodes

Reproduce code:
---------------
$xml_file = 'test.xml';
$xml = simplexml_load_file($xml_file);
foreach($xml->Worksheet->attributes() as $a => $b) {
    echo $a,'="',$b,"\"\n";
}

test.xml:
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:html="http://www.w3.org/TR/REC-html40";>
 <Worksheet ss:Name="English">
 </Worksheet>
</Workbook>

Expected result:
----------------
Name="English"


-- 
Edit bug report at http://bugs.php.net/?id=30617&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30617&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30617&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30617&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30617&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30617&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30617&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30617&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30617&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30617&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30617&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30617&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30617&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30617&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30617&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30617&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30617&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30617&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30617&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30617&r=mysqlcfg

Reply via email to