Skip to content

XML deserialization for fully whitespaced strings loads empty strings #109

@volo-zyko

Description

@volo-zyko

When I deserialize the following XML "<value> </value>" to std::string I get empty string. This happens because RapidXML ignores whitespaces. This could be fixed with "<value xml:space='preserve'> </value>" during serialization but this is not supported by RapidXML during parsing. What RapidXML supports is CDATA. So, during serialization std::strings could be saved as "<value><![CDATA[ ]]></value>" and RapidXML can parse this construct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions