#39268 [Opn->Bgs]: SimpleXML doesn't parse attributes with : inside
| From: | helly@php.net | Date: | Thu, 26 Oct 2006 18:25:41 +0000 |
| Subject: | #39268 [Opn->Bgs]: SimpleXML doesn't parse attributes with : inside | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104022@lists.php.net to get a copy of this message | ||
ID: 39268
Updated by: helly@php.net
Reported By: luca dot casagrande at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: SimpleXML related
Operating System: Linux
PHP Version: 5.1.6
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Try 5.2 and use the namespace parameters of the access functions. In
5.1 you need to register the namespace you want to access. Try that as
well, it should solve your problem immediatley if you know the
namespaces.
Previous Comments:
------------------------------------------------------------------------
[2006-10-26 16:34:04] luca dot casagrande at gmail dot com
Description:
------------
Hi!
I am trying to parse an xml with simplexml;
This is the XML file:
<ExecuteResponse version="0.4.0"
xsi:schemaLocation="http://www.opengeospatial.net/wps
http://www.bnhelp.cz/schema/wps/0.4.0/wpsExecute.xsd">
<ows:Identifier>
visibility2
</ows:Identifier>
−
<Status>
<ProcessSucceeded/>
</Status>
−
<ProcessOutputs>
−
<Output>
<ows:Identifier>
output
</ows:Identifier>
<ows:Title>
Resulting output map
</ows:Title>
<!--Element Abstract not set-->
<ComplexValueReference encoding="utf-8" format="image/png"
ows:reference="http://localhost/wps/wpsoutputs/output-2006-10-26-17-53-42.tif"
schema=""/>
</Output>
</ProcessOutputs>
</ExecuteResponse
This is the dump of the xml obj:
object(SimpleXMLElement)#1 (3) {
["@attributes"]=>
array(1) {
["version"]=>
string(5) "0.4.0"
}
["Status"]=>
object(SimpleXMLElement)#3 (1) {
["ProcessSucceeded"]=>
object(SimpleXMLElement)#2 (0) {
}
}
["ProcessOutputs"]=>
object(SimpleXMLElement)#4 (1) {
["Output"]=>
object(SimpleXMLElement)#5 (2) {
["comment"]=>
object(SimpleXMLElement)#6 (0) {
}
["ComplexValueReference"]=>
object(SimpleXMLElement)#7 (1) {
["@attributes"]=>
array(3) {
["encoding"]=>
string(5) "utf-8"
["format"]=>
string(9) "image/png"
["schema"]=>
string(0) ""
}
}
}
}
}
As you can see, ows:reference attribute, is skipped.
Thx
Luca
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39268&edit=1