C# Class MahTweets.Core.Extensions.XmlExtensions

Helper Class for Manipulating XML
Datei anzeigen Open project: nickhodge/MahTweets.LawrenceHargrave

Public Methods

Method Description
AddAttribute ( this ParentNode, string Name ) : XmlAttribute

Adds a new Attribute to the specified Node using the default namespace for the document.

AddChild ( this ParentNode, string Name ) : XmlNode

Adds a new Child Node to the specified Node using the default Namespace.

InnerTextOrDefault ( this node ) : string

Returns the InnerText of the Node. If the node InnerText is Null or Empty, it returns an empty string.

InnerTextOrDefault ( this node, string Default ) : string

Returns the InnerText of the Node. If the node InnerText is Null or Empty, it returns the string in Default;

IsNullOrEmpty ( this node ) : bool

Returns True if the Node itself is null, or the Node.InnerText (after trimming) is null or empty

Method Details

AddAttribute() public static method

Adds a new Attribute to the specified Node using the default namespace for the document.
public static AddAttribute ( this ParentNode, string Name ) : XmlAttribute
ParentNode this
Name string
return System.Xml.XmlAttribute

AddChild() public static method

Adds a new Child Node to the specified Node using the default Namespace.
public static AddChild ( this ParentNode, string Name ) : XmlNode
ParentNode this
Name string
return System.Xml.XmlNode

InnerTextOrDefault() public static method

Returns the InnerText of the Node. If the node InnerText is Null or Empty, it returns an empty string.
public static InnerTextOrDefault ( this node ) : string
node this
return string

InnerTextOrDefault() public static method

Returns the InnerText of the Node. If the node InnerText is Null or Empty, it returns the string in Default;
public static InnerTextOrDefault ( this node, string Default ) : string
node this
Default string String to return if Node Inntertext
return string

IsNullOrEmpty() public static method

Returns True if the Node itself is null, or the Node.InnerText (after trimming) is null or empty
public static IsNullOrEmpty ( this node ) : bool
node this
return bool