XElementExtensions.HasElementValue method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Xml.Extensions
Assembly Skybrud.Essentials.dll

HasElementValue(XElement, XName)

Extension method

Gets whether the first element matching the specified name has a value.

public static bool HasElementValue(this XElement element, XName name)

Parameters

element XElement

The parent XElement .

name XName

An instance of XName identifying the element.

Returns

true if an element was found and has a value; otherwise false.

HasElementValue(XElement, string)

Extension method

Gets whether the first element matching the specified XPath expression has a value.

public static bool HasElementValue(this XElement element, string expression)

Parameters

element XElement

The parent XElement .

expression String

The XPath expression.

Returns

true if an element was found and has a value; otherwise false.

HasElementValue(XElement, string, IXmlNamespaceResolver)

Extension method

Gets whether the first element matching the specified XPath expression has a value.

public static bool HasElementValue(this XElement element, string expression, IXmlNamespaceResolver resolver)

Parameters

element XElement

The parent XElement .

expression String

The XPath expression.

An instance of IXmlNamespaceResolver for the namespace prefixes in the XPath expression.

Returns

true if an element was found and has a value; otherwise false.