I have two XML Documents, on the first I have:
<IamAXMLNode attr1="50%" attr2="Cool" attr3="I am a free text optional cool attribute" />
But in the second one, the whole info of IamAXMLNode attributes should be included on a single attribute:
<ACollageNode type="IamAXMLNode">'content of the three attr unified'</ACollageNode>
ACollageNode content must match on a grammar as alphanumeric string
It is not possible to change the schema of the XML Documents.
The options I am handling are:
- Included them as text using a separator (I will find a separator that is not used on any field). What if the day after tomorrow specs change and the character could be used on those attributes? :S
- Serialize to byte array and use a safe separator. Is there any tool to do this? some Boost library like Serialize would be useful?
- Using CDATA. Actually, I would like to encode the info, not the whole XML Node
Thanks in advance
I finally add a separator and scape the occurrences on the fields… since the output had to be human readable.