private static void AddDcElement(ScopedElementCollection collection, string name, string content) { if (!string.IsNullOrEmpty(content)) { collection.Add(new DcElement(Prefix + name, ToXmlContent(content))); } }
public static void AddDcElement(ScopedElementCollection collection, List <string> nameList, string content) { if (!string.IsNullOrEmpty(content)) { foreach (var name in nameList) { collection.Add(new DcElement(Prefix + name, ToXmlContent(content))); } } }
public static void AddDcElement(ScopedElementCollection collection, string name, string content) { if (string.IsNullOrEmpty(content)) { return; } var element = GetDcElement(collection, name); if (element != null) { collection.Remove(element); } collection.Add(new DcElement(Prefix + name, StringUtils.ToXmlContent(content))); }