protected override void Apply() { CommonErrors.ExpectNoArguments(Log, TransformNameShort, ArgumentString); TargetNode.AppendChild(TransformNode); Log.LogMessage(MessageType.Verbose, SR.XMLTRANSFORMATION_TransformMessageInsert, TransformNode.Name); }
protected void RemoveNode() { CommonErrors.ExpectNoArguments(Log, TransformNameShort, ArgumentString); XmlNode parentNode = TargetNode.ParentNode; parentNode.RemoveChild(TargetNode); Log.LogMessage(MessageType.Verbose, SR.XMLTRANSFORMATION_TransformMessageRemove, TargetNode.Name); }
protected override void Apply() { CommonErrors.ExpectNoArguments(Log, TransformNameShort, ArgumentString); CommonErrors.WarnIfMultipleTargets(Log, TransformNameShort, TargetNodes, ApplyTransformToAllTargetNodes); XmlNode parentNode = TargetNode.ParentNode; parentNode.ReplaceChild( TransformNode, TargetNode); Log.LogMessage(MessageType.Verbose, SR.XMLTRANSFORMATION_TransformMessageReplace, TargetNode.Name); }