Following code snippet may help you to remove an XML node from an XML message string. private str removeXMLTag( str xml) { XmlDocument doc = new XmlDocument(); XmlElement nodeScript; XmlNode parentNode, childNode; XmlNodeList xmlScriptList, parentNodeList, childNodeList; int i,j; doc.loadXml(xml); // Get the root element and its child nodes nodeScript = doc.getNamedElement( "SalesOrder" ); xmlScriptList = nodeScript.childNodes(); for (i= 0 ; i < xmlScriptList.length(); i++) { parentNode = xmlScriptList.item(i); childNodeList = parentNode.childNodes(); for (j= 0 ; j < childNodeList.length(); j++) { childNode = childNodeList.item(j); if (childNode.selectSingleNode( "Notes" )) {
A library with Microsoft Dynamics AX, Microsoft Dynamics 365 FinOps and Supply Chain Management, Power Platform, Integrations, development and functional processes, tricks and trip, tutorials and much more....