namespace HaWeb.Settings.XMLRoots; using System.Xml.Linq; using HaWeb.XMLParser; public class EditsRoot : HaWeb.XMLParser.IXMLRoot { public string Type { get; } = "Texteingriffe"; public string Container { get; } = "edits"; public Predicate IsCollectedObject { get; } = (elem) => { if (elem.Name == "editreason") return true; else return false; }; public Func GetKey { get; } = (elem) => { var index = elem.Attribute("index"); if (index != null && !String.IsNullOrWhiteSpace(index.Value)) return index.Value; else return null; }; public List<(string, string)>? GenerateFields(XMLRootDocument document) { return null; } public (string?, string) GenerateIdentificationString(XElement element) { return (null, Container); } public bool Replaces(XMLRootDocument doc1, XMLRootDocument doc2) { return true; } }