Skip to content

Item cannot reconstruct XML with CDATA #5

Description

@apandichi

Given the following XML:

<?xml version="1.0" encoding="utf-8"?>
<root>
    <![CDATA[<?xml version="1.0" encoding="utf-8"?>
    <CurrentWeather>
        <Status>Success</Status>
    </CurrentWeather>
    ]]>
</root>

Parsing this XML into an Item instance, and then calling getElementAsString() on it, will result in a malformed XML that is missing the wrapper.

Please see a testcase here: apandichi@311767b

A possible fix for this can be found in this branch:
https://github.com/apandichi/choreos_v-v/commits/cdata-issue
Relevant commits:
apandichi@329f109
apandichi@c5ad49e

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions