I try to create a xml file with comments and it works fine. Now I try in batch job and the following error appears :
System.InvalidCastException: Unable to cast object of type ‘Dynamics.Ax.Application.XmlComment’ to type ‘Dynamics.Ax.Application.XmlElement’.
At the line :
xmlNode = xmlNodeWrite.appendChild(xmlDoc.createComment(xmlNodeRead.innerText()));
Is there a way to create xml comment in batch job?
Thanks in advance.