XMLCoder icon indicating copy to clipboard operation
XMLCoder copied to clipboard

Decode/Encode comments from XML?

Open MehmetBal opened this issue 6 years ago • 1 comments

Hi,

I went through the test examples, although they are thorough I didn't see any examples about how to handle comments. So do you have a recommendation on how do that?

sample XML:

<root>
   <-- this is the header comment -->
   <fancy_header/>
</root>

I convert from XML to some other type then back to XML so I am trying to conserve the original comments.

Thanks for the help

MehmetBal avatar Sep 09 '19 23:09 MehmetBal

Hi @MehmetBal, sorry for the delayed reply. Good news is that Foundation's XMLParser supports comments. On our side, we only need to find a proper API to integrate it. I'm thinking that something similar to the coding key value intrinsic could work. This could be a new comment coding key API that maps all comments to every key with "xmlComment" raw value.

What are your thoughts on this? Would this API work for you?

MaxDesiatov avatar Oct 05 '19 14:10 MaxDesiatov