Table of Contents

Class XNodeExtensions

Namespace
Songhay.Extensions
Assembly
SonghayCore.dll

Extensions of XNode.

public static class XNodeExtensions
Inheritance
XNodeExtensions
Inherited Members

Methods

GetInnerXml(XNode)

Gets the inner XML.

public static string? GetInnerXml(this XNode node)

Parameters

node XNode

The node.

Returns

string

GetInnerXml(XNode?, bool, ReaderOptions)

Gets the inner XML.

public static string? GetInnerXml(this XNode? node, bool stripNamespaces, ReaderOptions options)

Parameters

node XNode

The node.

stripNamespaces bool

if set to true then strip namespaces (true by default).

options ReaderOptions

The options (None by default).

Returns

string

Remarks

“If performance is important (e.g. lots of XML, parsed frequently), I'd use Daniel's CreateReader method every time.” [http://stackoverflow.com/questions/3793/best-way-to-get-innerxml-of-an-xelement] —Luke Sampson

GetNamespaceResolver(XNode?)

Gets IXmlNamespaceResolver from the specified node.

public static IXmlNamespaceResolver? GetNamespaceResolver(this XNode? node)

Parameters

node XNode

The node.

Returns

IXmlNamespaceResolver

GetOuterXml(XNode?)

Gets the outer XML.

public static string? GetOuterXml(this XNode? node)

Parameters

node XNode

The node.

Returns

string

GetOuterXml(XNode?, bool, ReaderOptions)

Gets the outer XML.

public static string? GetOuterXml(this XNode? node, bool stripNamespaces, ReaderOptions options)

Parameters

node XNode

The node.

stripNamespaces bool

if set to true then strip namespaces (true by default).

options ReaderOptions

The options (None by default).

Returns

string