You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I have the following XML that I would like to deserialize using Quick-Xml and Serde. It is part of a very large, nested XML structure.
<AbstractTextLabel="Results"NlmCategory="UNASSIGNED">
We found that neonatal mortality was significantly associated with neonatal prematurity (p = 0.013), IUGR
<mml:mathxmlns:mml="http://www.w3.org/1998/Math/MathML">
<mml:mo><</mml:mo>
</mml:math> 0.001), placental pathology (p = 0.04), we had no maternal mortality.
</AbstractText>
I want to deserialize the above into the following struct:
As you can see the $value of <AbstractText> has some <mml:math> tags and occasionally will have some HTML tags.
I would like to have those tags deserialized to String. So "<mml:math>" must be stringiified as is.
How can I go about doing this? Currently I get Error: Start when trying to deserialize this.
The text was updated successfully, but these errors were encountered:
Zenleaf
changed the title
How to avoid deserializing certain xml elements and return as String
How to avoid deserializing certain XML elements (like HTML tags) and return as String
Nov 7, 2020
Hi there, I have the following XML that I would like to deserialize using Quick-Xml and Serde. It is part of a very large, nested XML structure.
I want to deserialize the above into the following struct:
As you can see the
$value
of<AbstractText>
has some<mml:math>
tags and occasionally will have some HTML tags.I would like to have those tags deserialized to String. So
"<mml:math>"
must be stringiified as is.How can I go about doing this? Currently I get
Error: Start
when trying to deserialize this.The text was updated successfully, but these errors were encountered: