-
Notifications
You must be signed in to change notification settings - Fork 276
Closed
Labels
bughelp wantedserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML
Description
CDATA elements cannot contain sequence ]]>. When that sequence is appeared in the data, it should be split into two pieces and each piece should be put in their own CDATA container:
]]>
become
<![CDATA[]]]>
<![CDATA[]>]]>or
<![CDATA[]]]]>
<![CDATA[>]]>Currently in serde deserializer only one CDATA event processed at time, that means, that deserialization
<root>
<string><![CDATA[]]]]><![CDATA[>]]></string>
</root>into
struct AnyName {
string: String,
}would fail or wrongly return ]] instead of ]]>.
To fix that we should merge CDATA events, that there are some ambiguities that should be investigated:
- should we merge CDATA and text events:
should return
<![CDATA[one]]>twoonetwo? - should we ignore comments between CDATA events? Between CDATA and text events?
should return
<![CDATA[one]]><!--comment--><![CDATA[two]]>
onetwo?should return<![CDATA[one]]><!--comment-->two
onetwo?
Currently all comments are skips at very early stage and deserializer seesas<![CDATA[one]]><!--comment--><![CDATA[two]]>
<![CDATA[one]]><![CDATA[two]]> - should we ignore processing instructions between CDATA events? Between CDATA and text events?
should return
<![CDATA[one]]><?pi?><![CDATA[two]]>
onetwo?should return<![CDATA[one]]><?pi?>two
onetwo?
Currently all processing instructions are skips at very early stage and deserializer seesas<![CDATA[one]]><?pi?><![CDATA[two]]>
<![CDATA[one]]><![CDATA[two]]> - should we ignore whitespaces between CDATAs? Between CDATA and text?
should return
<![CDATA[one]]> <![CDATA[two]]>
onetwo?should return<![CDATA[one]]> twoonetwo?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bughelp wantedserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML