oozcitak / xmlbuilder-js

An XML builder for node.js
MIT License
918 stars 107 forks source link

Option to force all nodes to use CDATA #232

Closed danpetitt closed 4 years ago

danpetitt commented 4 years ago

It would be great to have an option to either ensure all nodes output as CDATA and do not xml escape, or when using the JSON notational method of building the XML you could declare the node text as #CDATA instead of #TEXT to get a more customisable individual ability to do this.

danpetitt commented 4 years ago

Ignore me on that; after looking at your code, I have just found that you already have this, but its undocumented in the wiki: #cdata-section

oozcitak commented 4 years ago

It is in the wiki here: https://github.com/oozcitak/xmlbuilder-js/wiki#cdata-nodes and here: https://github.com/oozcitak/xmlbuilder-js/wiki/Conversion-From-Object#cdata-decorator

danpetitt commented 4 years ago

I am very sorry; I just couldnt find it for looking; i was searching the wrong things :-)

oozcitak commented 4 years ago

No problem. Happy to help. :)