wankdanker / node-object-to-xml

Convert any JavaScript object to XML
MIT License
19 stars 8 forks source link

CDATA Issue #1

Closed nosweat closed 9 years ago

nosweat commented 9 years ago

it escapes the cdata from <![CDATA[Text String]]> becomes &lt;![CDATA[Text String]]&gt;

Any idea how to make the object allow Cdata format?

{ MyCdata : {
                '@': {
                    'MyAttrId': AttrId
                },
                '#': "<![CDATA[Text String]]>"
            }};
wankdanker commented 9 years ago

I pushed v1.0.0 to npm with a check for CDATA strings that skips sanitizing.

It should allow you to do exactly what you specified in your example.

Let me know if you have any issues.

nosweat commented 9 years ago

@wankdanker thank you for quick response. I appreciate it. I tried the new version and it worked just fine.