XElementExtensions Class
Extensions of XElement.
Namespace
Songhay.Extensions
Base Types
  • object
graph BT Type-->Base0["object"] Type["XElementExtensions"] class Type type-node

Syntax

public static class XElementExtensions

Methods

Name Return Value Summary
AddOnce(XElement?, XAttribute?) void
Prevents the specified XAttribute from being added more than once.
static
GetElement(XNode?, XName?) XElement?
Gets the XElement.
static
HasElementName(XElement?, XName?) bool
Determines whether the XElement has the specified XName.
static
HasElementName(XNode?, XName?) bool
Determines whether the XNode has the specified XName.
static
IsElement(XNode?) bool
Determines whether the specified node is XElement.
static
ToAttributeValueOrDefault(XElement?, string, string) string
Converts the XElement into a attribute value or default.
static
ToAttributeValueOrNull(XElement?, string) string
Returns the attribute value or null.
static
ToElementValueOrDefault(XElement?, string) string
Converts the XElement into a element value or default.
static
ToElementValueOrNull(IEnumerable<XElement>?) string
Returns the element value or null.
static
ToElementValueOrNull(XElement?) string
Converts the XElement into a element value or null.
static
WithoutNamespaces(XElement?) XElement?
Returns the specified XElement without namespace qualifiers on elements and attributes.
static