Class XElementExtensions
Extension methods for the System.Xml.Linq.XElement.
Inheritance
Namespace: Cuemon.Xml.Linq
Assembly: Cuemon.Xml.dll
Syntax
public static class XElementExtensions
Methods
| Improve this DocIsXmlString(String)
Determines whether the specified value
is a valid XML string.
Declaration
public static bool IsXmlString(this string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value to evaluate. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryParseXElement(String, LoadOptions, out XElement)
Tries to load an System.Xml.Linq.XElement from a value
that contains XML, optionally preserving white space and retaining line information.
Declaration
public static bool TryParseXElement(this string value, LoadOptions options, out XElement result)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A System.String that contains XML. |
System.Xml.Linq.LoadOptions | options | A System.Xml.Linq.LoadOptions that specifies white space behavior, and whether to load base URI and line information. |
System.Xml.Linq.XElement | result | When this method returns, it contains the System.Xml.Linq.XElement populated from the |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryParseXElement(String, out XElement)
Tries to load an System.Xml.Linq.XElement from a value
that contains XML.
Declaration
public static bool TryParseXElement(this string value, out XElement result)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A System.String that contains XML. |
System.Xml.Linq.XElement | result | When this method returns, it contains the System.Xml.Linq.XElement populated from the |
Returns
Type | Description |
---|---|
System.Boolean |
|