PeanutButter
Loading...
Searching...
No Matches
PeanutButter.XmlUtils.XElementExtensions Class Reference

Adds some convenience extensions to XElement and XDocument instances. More...

Static Public Member Functions

static string Text (this XElement el)
 Returns all text nodes concatenated together for an XElement as plain ol' text.
static void ScrubNamespaces (this XDocument doc)
 Scrubs namespaces from a document.
static void ScrubNamespaces (this XElement el)
 Recursively scrubs namespaces from an element.

Detailed Description

Adds some convenience extensions to XElement and XDocument instances.

Member Function Documentation

◆ ScrubNamespaces() [1/2]

void PeanutButter.XmlUtils.XElementExtensions.ScrubNamespaces ( this XDocument doc)
static

Scrubs namespaces from a document.

  • useful when you just want to deal with xml, and namespaces are making that a nuisance
Parameters
doc

◆ ScrubNamespaces() [2/2]

void PeanutButter.XmlUtils.XElementExtensions.ScrubNamespaces ( this XElement el)
static

Recursively scrubs namespaces from an element.

  • useful when you just want to deal with xml, and namespaces are making that a nuisance
Parameters
el

◆ Text()

string PeanutButter.XmlUtils.XElementExtensions.Text ( this XElement el)
static

Returns all text nodes concatenated together for an XElement as plain ol' text.

Parameters
el
Returns

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.XmlUtils/XElementExtensions.cs