|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62448 XML ID attribute not parsed correctly, overriding the ID node value in the XML
Submitted: 2012-06-29 11:34 UTC Modified: -
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: danny dot dorfel at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant OS: Linux / CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
46 - 44 = ?
Subscribe to this entry?

 [2012-06-29 11:34 UTC] danny dot dorfel at gmail dot com
The XML returned has an Id node and an Id attribute. The parsed response creates 
an object and fills the Id value with the value of the Id attribute. De node's 
value is not used.

ID and IDREF attributes are predefined SOAP attributes and don't need to be 
parsed. Unfortunately .net soap services return the ID as z:Id, resulting in a 

Response XML:
<Person z:ID="i1" xmlns:z="">

For me, preferred end result would be that we have the value of the node in Id 
and the value of the attribute in _Id or something like _attrib['Id'].

Expected result:
stdClass Object
    [Person] => stdClass Object
            [Id] => 94acdd8b-2ae5-448a-9a61-d2df5218111e

Actual result:
stdClass Object
    [Person] => stdClass Object
            [Id] => i1


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Apr 02 13:03:41 2023 UTC