{"id":423,"date":"2011-03-01T20:52:00","date_gmt":"2011-03-01T20:52:00","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=423"},"modified":"2011-03-01T20:52:00","modified_gmt":"2011-03-01T20:52:00","slug":"an-error-occurred-while-parsing-entityname-error","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=423","title":{"rendered":"An error occurred while parsing EntityName"},"content":{"rendered":"<p>While integrating CRM orders to\u00a0our custom financial system webservice I got error &#8220;An error occurred while parsing EntityName&#8221; in my plugin. Our custom financial service accepts xml string as input, so while sending data in xml form, sometime account name contains special character like &#8216;&amp;&#8217; which is a illigal character in xml.so I wrote below function to replace illigal characters in xml request<\/p>\n<p>private string FormatText(string XmlRequest)<br \/>\n        {<br \/>\n            string _ModifiedXML = XmlRequest.Replace(&#8220;&amp;&#8221;, &#8220;&amp;&#8221;);<br \/>\n            _ModifiedXML = _ModifiedXML.Replace(&#8220;&#8221;, &#8220;&gt;&#8221;);<br \/>\n            _ModifiedXML = _ModifiedXML.Replace(&#8220;&#8216;&#8221;, &#8220;&apos;&#8221;);<br \/>\n            _ModifiedXML = _ModifiedXML.Replace(&#8220;&#8221;&#8221;, &#8220;&quot;&#8221;);<\/p>\n<p>            return _XmlRequest;<br \/>\n        }<\/p>\n<p>Hope it will help somebody !!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While integrating CRM orders to\u00a0our custom financial system webservice I got error &#8220;An error occurred while parsing EntityName&#8221; in my plugin. Our custom financial service accepts xml string as input, so while sending data in xml form, sometime account name contains special character like &#8216;&amp;&#8217; which is a illigal character in xml.so I wrote below function to replace illigal characters&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=423\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/423"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=423"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}