Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] add type casting to XML decoding #36482

Closed
@dkarlovi

Description

@dkarlovi

Description

The data coming from XML is always string. Additional support could be added for XML Schema, XML Schema instance type hints, making the decoded information much more correct.

Example

<foo xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <one xsi:type="xs:integer">123</one>
    <two xsi:type="xs:float">123.23</two>
    <three xsi:nil="true"/>
</foo>

could produce:

array
    one: int(123)
    two: float(123.23)
    three: null

but currently produces

array
    one: string "123"
    two: string "123.23"
    three: string ""

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions