php.net |  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: -
Votes:2
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danny dot dorfel at gmail dot com
New email:
PHP Version: OS:

 

 [2012-06-29 11:34 UTC] danny dot dorfel at gmail dot com
Description:
------------
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 
parse.

Response XML:
<Person z:ID="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
...
<Id>94acdd8b-2ae5-448a-9a61-d2df5218111e</Id>
...
</Person>

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
...
        )
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 17:01:30 2024 UTC