I have an XML document in which I have to run a bunch of rules on its nodes and attributes.
One of the rules requires the removal of a node. I managed to do that with the “Invoke Method” activity using the “Remove” Method.
Another rule requires the addition of a node and I am not being able to do it. I tried using the “Invoke Method” activity with the method “AddAfterSelf” but I am not finding a way to do it properly.
If you are updating a property, then you can do it in an assign activity. However, .AddAfterSelf is a method so you’ll need to do it in invoke method
TargetObject should be item.Element(“yourelement”).element('yourelement)
MethodName should be AddAfterSelf
Parameters: In (of type XElement) = New Xelement(“yourelement”)
Of course you’ll need to replace the “yourelement” with actual values - i was just too lazy to type it out from your screenshot since I couldn’t simply copy+paste