Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Wrapping XML entities in CDATA except already present Cdata in document using regex in c#.net

$
0
0

<?xml version="1.0" encoding="UTF-8"?>
<journal-meta>
<issn>Modern data &#x00027; is needed with dummy content. we are good to go.</issn>
<issn1><![CDATA[ data is not proper
&#x000E9;
 ]]>Modern data is needed with dummy content. we are good to go.</issn1>
<issn2>&#x000E9;Modern data is needed with dummy content. we are good to go.</issn2>
<issn3>&#x00027;Modern data is needed with dummy content. we are good to go.</issn3>

</journal-meta>

Output should  :

<?xml version="1.0" encoding="UTF-8"?>
<journal-meta>
<issn>Modern data &#x00027; is needed with dummy content. we are good to go.</issn>
<issn1><![CDATA[ data is not proper
&#x000E9;
 ]]>Modern data is needed with dummy content. we are good to go.</issn1>

<issn2><![CDATA[&#x000E9;]]>Modern data is needed with dummy content. we are good to go.</issn2>
<issn3><![CDATA[&#x00027;]]>Modern data is needed with dummy content. we are good to go.</issn3>



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>