Embed Several info fields in a XML Node Content

strendrownas

New Member
I have two XML Documents, on the first I have:\[code\]<IamAXMLNode attr1="50%" attr2="Cool" attr3="I am a free text optional cool attribute" />\[/code\]But in the second one, the whole info of IamAXMLNode attributes should be included on a single attribute:\[code\]<ACollageNode type="IamAXMLNode">'content of the three attr unified'</ACollageNode>\[/code\]ACollageNode content must match on a grammar as alphanumeric stringIt 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
 
Back
Top