public static string GetValue(this XObject current) { if (current.AtXhtmlDiv()) { return(((XElement)current).ToString(SaveOptions.DisableFormatting)); } else { return(current is XElement xelem? xelem.Attribute("value")?.Value.Trim() : current.Value()); } }