user2738797
user2738797

Reputation: 1

how to avoid converting of tags present in the CDATA format

I am putting the following value through CDATA while popoulating an xml,

<![CDATA[2 @#$*N 'STATE' ST]]> 

But in the xml request generated i got the following result,

&lt;![CDATA[2 @#$*N 'STATE' ST]]&gt

So my question is how to avoid converting of < to &lt and > to &gt? Please help

Upvotes: 0

Views: 109

Answers (1)

Henry
Henry

Reputation: 43728

I guess you used some XML library to do that. Just put in the raw string without the CDATA tagging. (i.e. "2 @#$*N 'STATE' ST") It is up to the library to decide how to represent the string value in the XML file.

It may quote special characters or it may use a CDATA section. The representation does not make a difference on the abstract value that is transported. In case it makes a difference for the receiver, the receiver is doing it wrong.

Upvotes: 1

Related Questions