AL icon indicating copy to clipboard operation
AL copied to clipboard

XmlElement.InnerXml is missing setter-function

Open navdotnetreqs opened this issue 3 years ago • 4 comments

XmlElement.InnerXml is missing a setter-function, and apparently we can only read the value in AL, not set a new value. Is this by design and is there a an alternative way to set the InnerXml without replacing the whole element?

In C# it exists. https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmlelement.innerxml?view=net-6.0

public override string InnerXml { get; set; }

navdotnetreqs avatar Feb 27 '22 19:02 navdotnetreqs

Any news on this?

navdotnetreqs avatar Jun 02 '22 09:06 navdotnetreqs

The same applies for InnerText Is there any way to replace to content of an xmlElment without a setter for these two values?

pri-kise avatar Dec 13 '22 10:12 pri-kise

I would find a setter function for InnerText highly suspicious. InnerText retrives concatenations of all the plain texts that can be scattered throughout various places in the element and therefore there isn't necessarily a fixed place where you could put the new text in. For InnerXML there could be some use of a set function because it would be simpler just applying a new text instead of using the replacement functions but on the other side replacewith isn't really much work.

JMA1972 avatar Dec 30 '22 14:12 JMA1972