Appearance
FindXElement Method
Definition
- Namespace:
JASE.Serializers - Assembly:
JASE.Serializers.dll
Overloads
| Name | Description |
|---|---|
XElement FindXElement(string xml, string elementName, bool caseSensitive = null) | Finds the first XElement that matches the specified element name within the given XML string or XElement object. |
XElement FindXElement(XDocument document, string elementName, bool caseSensitive = null) | Finds the first XElement that matches the specified element name within the given XDocument object. |
XElement FindXElement(XElement start, string elementName, bool caseSensitive = null) | Finds the first XElement that matches the specified element name within the given XElement object. |
XElement FindXElement(string xml, string elementName, bool caseSensitive = null)
csharp
XElement FindXElement(string xml, string elementName, bool caseSensitive = null)Finds the first XElement that matches the specified element name within the given XML string or XElement object.
Parameters
| Name | Description |
|---|---|
caseSensitive | Indicates whether the search should be case-sensitive. |
elementName | The name of the element to search for. |
xml | The XML string to search within. |
Returns
The first XElement that matches the specified element name, or null if no match is found.
XElement FindXElement(XDocument document, string elementName, bool caseSensitive = null)
csharp
XElement FindXElement(XDocument document, string elementName, bool caseSensitive = null)Finds the first XElement that matches the specified element name within the given XDocument object.
Parameters
| Name | Description |
|---|---|
caseSensitive | Indicates whether the search should be case-sensitive. |
document | The XDocument object to search within. |
elementName | The name of the element to search for. |
Returns
The first XElement that matches the specified element name, or null if no match is found.
XElement FindXElement(XElement start, string elementName, bool caseSensitive = null)
csharp
XElement FindXElement(XElement start, string elementName, bool caseSensitive = null)Finds the first XElement that matches the specified element name within the given XElement object.
Parameters
| Name | Description |
|---|---|
caseSensitive | Indicates whether the search should be case-sensitive. |
elementName | The name of the element to search for. |
start | The starting XElement object to search within. |
Returns
The first XElement that matches the specified element name, or null if no match is found.