C# Class Concordion.Api.Element

A wrapper class for an XML element, usually from the specification or the target of the specification
Afficher le fichier Open project: concordion/concordion-net Class Usage Examples

Private Properties

Свойство Type Description
GetChildNodes IEnumerable
WrapXElements IEnumerable

Méthodes publiques

Méthode Description
AddAttribute ( string localName, string value ) : Element

Adds an attribute to the element

AddStyleClass ( string style ) : Element

Applies a css class to the following element

AppendChild ( Element child ) : void

Appends a child Element after this one

AppendNonBreakingSpace ( ) : Element

Appends a nonbreaking space to the current Element

AppendNonBreakingSpaceIfBlank ( ) : Element

If the Element has no text then a element is appended

AppendSister ( Element element ) : void
AppendText ( string text ) : Element

Appends some text to the Element

Element ( System.Xml.Linq.XElement element ) : System

Constructs a new object of the ElemElementent type

Element ( string name ) : System

Constructs a new object of the Element type

Equals ( object obj ) : bool

Determines if another object equals this one

GetAttributeValue ( string attributeName ) : string

Gets the value of an attribute of the Element

GetAttributeValue ( string attributeName, string namespaceName ) : string

Gets the value of an attribute of the Element in the specified namespace

GetChildElements ( ) : IEnumerable

Gets only the immediate child Element of the current one

GetChildElements ( string name ) : IEnumerable
GetDescendantElements ( string name ) : IList

Gets all of he descendant Element objects with a specific name

GetFirstChildElement ( string elementName ) : Element

Gets the first child Element with the following name The document is searched in DOM document order

GetFirstDescendantNamed ( string name ) : Element

Gets the first descendant that matches the name

GetHashCode ( ) : int

Gets a hashcode of the object

GetRootElement ( ) : Element

Gets the root element of the System.Xml.Linq.XDocument that this Element is contained within

IsNamed ( string name ) : bool

Determines if the Element has a name like the parameter

MoveChildrenTo ( Element destinationElement ) : void

Moves all of the children of this Element to another element

PrependChild ( Element child ) : Element

Prepends a child Element before this one

PrependText ( string text ) : void

Adds some text to the first of the text of this Element>

SetId ( string id ) : Element

Sets the id of the current element

ToXml ( ) : string

Outputs the Element to a string as xml

Private Methods

Méthode Description
GetChildNodes ( ) : IEnumerable

Gets all child System.Xml.Linq.XNode

WrapXElements ( IEnumerable xElements ) : IEnumerable

Method Details

AddAttribute() public méthode

Adds an attribute to the element
public AddAttribute ( string localName, string value ) : Element
localName string The name of the attribute
value string The value of the attribute
Résultat Element

AddStyleClass() public méthode

Applies a css class to the following element
public AddStyleClass ( string style ) : Element
style string The name of the style to apply
Résultat Element

AppendChild() public méthode

Appends a child Element after this one
public AppendChild ( Element child ) : void
child Element
Résultat void

AppendNonBreakingSpace() public méthode

Appends a nonbreaking space to the current Element
public AppendNonBreakingSpace ( ) : Element
Résultat Element

AppendNonBreakingSpaceIfBlank() public méthode

If the Element has no text then a element is appended
public AppendNonBreakingSpaceIfBlank ( ) : Element
Résultat Element

AppendSister() public méthode

public AppendSister ( Element element ) : void
element Element
Résultat void

AppendText() public méthode

Appends some text to the Element
public AppendText ( string text ) : Element
text string
Résultat Element

Element() public méthode

Constructs a new object of the ElemElementent type
public Element ( System.Xml.Linq.XElement element ) : System
element System.Xml.Linq.XElement The to wrap
Résultat System

Element() public méthode

Constructs a new object of the Element type
public Element ( string name ) : System
name string The name of the new Element
Résultat System

Equals() public méthode

Determines if another object equals this one
public Equals ( object obj ) : bool
obj object
Résultat bool

GetAttributeValue() public méthode

Gets the value of an attribute of the Element
public GetAttributeValue ( string attributeName ) : string
attributeName string The name of the attribute
Résultat string

GetAttributeValue() public méthode

Gets the value of an attribute of the Element in the specified namespace
public GetAttributeValue ( string attributeName, string namespaceName ) : string
attributeName string The name of the attribute
namespaceName string The name of the xml namespace
Résultat string

GetChildElements() public méthode

Gets only the immediate child Element of the current one
public GetChildElements ( ) : IEnumerable
Résultat IEnumerable

GetChildElements() public méthode

public GetChildElements ( string name ) : IEnumerable
name string
Résultat IEnumerable

GetDescendantElements() public méthode

Gets all of he descendant Element objects with a specific name
public GetDescendantElements ( string name ) : IList
name string
Résultat IList

GetFirstChildElement() public méthode

Gets the first child Element with the following name The document is searched in DOM document order
public GetFirstChildElement ( string elementName ) : Element
elementName string
Résultat Element

GetFirstDescendantNamed() public méthode

Gets the first descendant that matches the name
public GetFirstDescendantNamed ( string name ) : Element
name string The name to find
Résultat Element

GetHashCode() public méthode

Gets a hashcode of the object
public GetHashCode ( ) : int
Résultat int

GetRootElement() public méthode

Gets the root element of the System.Xml.Linq.XDocument that this Element is contained within
public GetRootElement ( ) : Element
Résultat Element

IsNamed() public méthode

Determines if the Element has a name like the parameter
public IsNamed ( string name ) : bool
name string
Résultat bool

MoveChildrenTo() public méthode

Moves all of the children of this Element to another element
public MoveChildrenTo ( Element destinationElement ) : void
destinationElement Element
Résultat void

PrependChild() public méthode

Prepends a child Element before this one
public PrependChild ( Element child ) : Element
child Element
Résultat Element

PrependText() public méthode

Adds some text to the first of the text of this Element>
public PrependText ( string text ) : void
text string
Résultat void

SetId() public méthode

Sets the id of the current element
public SetId ( string id ) : Element
id string The id to set
Résultat Element

ToXml() public méthode

Outputs the Element to a string as xml
public ToXml ( ) : string
Résultat string