C# Class CCNet.Build.Confluence.PageDocumentExtensions

Helper methods to work with Confluence XML document.
Show file Open project: shuruev/CCNet.Extensions

Public Methods

Method Description
RemoveIfExists ( this attribute ) : void

Removes specified attribute, allows null to be passed.

XAttribute ( this element, string name ) : System.Xml.Linq.XAttribute

Finds attribute by name, using internal namespace prefixes.

XElement ( this element, string xpath ) : System.Xml.Linq.XElement

Executes XPath query over existing project document and namespace manager.

XElements ( this element, string xpath ) : IEnumerable

Executes XPath query over existing project document and namespace manager.

XValue ( this element, string value ) : System.Xml.Linq.XElement

Encodes internal HTML entities in specified value.

XValue ( this element ) : string

Decodes specified value from internal HTML entities.

Method Details

RemoveIfExists() public static method

Removes specified attribute, allows null to be passed.
public static RemoveIfExists ( this attribute ) : void
attribute this
return void

XAttribute() public static method

Finds attribute by name, using internal namespace prefixes.
public static XAttribute ( this element, string name ) : System.Xml.Linq.XAttribute
element this
name string
return System.Xml.Linq.XAttribute

XElement() public static method

Executes XPath query over existing project document and namespace manager.
public static XElement ( this element, string xpath ) : System.Xml.Linq.XElement
element this
xpath string
return System.Xml.Linq.XElement

XElements() public static method

Executes XPath query over existing project document and namespace manager.
public static XElements ( this element, string xpath ) : IEnumerable
element this
xpath string
return IEnumerable

XValue() public static method

Encodes internal HTML entities in specified value.
public static XValue ( this element, string value ) : System.Xml.Linq.XElement
element this
value string
return System.Xml.Linq.XElement

XValue() public static method

Decodes specified value from internal HTML entities.
public static XValue ( this element ) : string
element this
return string