An error occurred while parsing EntityName. in Dynamisc 365 AX

Hi

An error occurred while parsing EntityName. in Dynamisc 365 AX

While reading xml file i was getting above error.

Solution:

Replace Not valid in XML elements in XML String by below method.

public  System.String EscapeXMLValue(System.String xmlString)
    {

        if (xmlString == null)
            return "XML is missing";

        return xmlString.Replace("'"," ").Replace(",", " ").Replace("&", " ");

    }


Reference


Comments