XMLCoder
XMLCoder copied to clipboard
Decode/Encode comments from XML?
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
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?