Cdata sections
It can happen that some subelement can contain a payload with for example, a big json object. The xml element could be use as an envelope for routing other abstract payloads, and so escaping them could make the blob much bigger for the network transfer, and very unreadable for the debugging eye. So at least make it optional that you want to use cdata escaping when needed.
There's also a couple of "breaking" changes, current code was doing iolist_to_binary for the function called to_iolist, which seems dummy, you might as well call to_binary if you want a binary. iodata usually has a performance advantage improvement for network transmission, so keep iodata as iodata when you want it.
Codecov Report
Merging #59 (62ccc33) into master (3299e97) will increase coverage by
1.83%. The diff coverage is92.30%.
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 71.49% 73.32% +1.83%
==========================================
Files 7 7
Lines 1098 1106 +8
Branches 158 160 +2
==========================================
+ Hits 785 811 +26
+ Misses 313 295 -18
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/exml_nif.erl | 41.66% <ø> (ø) |
|
| src/exml.erl | 91.42% <90.90%> (ø) |
|
| c_src/exml.cpp | 94.49% <93.33%> (-0.19%) |
:arrow_down: |
| c_src/rapidxml_print.hpp | 59.56% <0.00%> (+10.38%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 3299e97...62ccc33. Read the comment docs.