C# Класс erminas.SmartAPI.Utils.XmlUtil

Показать файл Открыть проект

Открытые методы

Метод Описание
AddAttribute ( this xmlElement, string attributeName, string value ) : void

Creates an attribute via the owner document of xmlElement , sets its value and appends it to .

AddElement ( this node, string name ) : XmlElement

Creates an XmlElement and appends it as child to the XmlNode

GetAttributeValue ( this xmlElement, string attributeName ) : string

Gets the value of an attribute. If the attribute does not exists, null is returned.

GetBoolAttributeValue ( this xmlElement, string attributeName ) : bool?
GetDoubleAttributeValue ( this xmlElement, string attributeName ) : double?
GetGuid ( this xmlElement ) : System.Guid
GetGuid ( this xmlElement, String attributeName ) : System.Guid
GetIntAttributeValue ( this xmlElement, string attributeName ) : int?
GetName ( this xmlElement ) : string
GetOADate ( this element, string attributeName = "date" ) : DateTime?
GetSingleElement ( this doc, string tagName ) : XmlElement
IsAttributeSet ( this xmlElement, ISessionObject session, string attributeName ) : bool
IsContainingOk ( this xmlDoc ) : bool
NodeToString ( this xmlElement ) : string

Creates a string representation of an XmlNode

SetAttributeValue ( this xmlElement, string attributeName, string value ) : void

Sets an attribute to a value. If no fitting XmlAttribute exists, a new one is created/appended and its value set.

ToOADate ( this value ) : System.DateTime
TryGetGuid ( this xmlElement, System.Guid &guid ) : bool
TryGetGuid ( this xmlElement, string attributeName, System.Guid &guid ) : bool

Описание методов

AddAttribute() публичный статический Метод

Creates an attribute via the owner document of xmlElement , sets its value and appends it to .
public static AddAttribute ( this xmlElement, string attributeName, string value ) : void
xmlElement this The node, the attribute gets added to
attributeName string Name of the attribute
value string Value of the attribute
Результат void

AddElement() публичный статический Метод

Creates an XmlElement and appends it as child to the XmlNode
public static AddElement ( this node, string name ) : XmlElement
node this The parent node
name string Name of the newly created element
Результат System.Xml.XmlElement

GetAttributeValue() публичный статический Метод

Gets the value of an attribute. If the attribute does not exists, null is returned.
public static GetAttributeValue ( this xmlElement, string attributeName ) : string
xmlElement this The node
attributeName string Name of the attribute
Результат string

GetBoolAttributeValue() публичный статический Метод

public static GetBoolAttributeValue ( this xmlElement, string attributeName ) : bool?
xmlElement this
attributeName string
Результат bool?

GetDoubleAttributeValue() публичный статический Метод

public static GetDoubleAttributeValue ( this xmlElement, string attributeName ) : double?
xmlElement this
attributeName string
Результат double?

GetGuid() публичный статический Метод

public static GetGuid ( this xmlElement ) : System.Guid
xmlElement this
Результат System.Guid

GetGuid() публичный статический Метод

public static GetGuid ( this xmlElement, String attributeName ) : System.Guid
xmlElement this
attributeName String
Результат System.Guid

GetIntAttributeValue() публичный статический Метод

public static GetIntAttributeValue ( this xmlElement, string attributeName ) : int?
xmlElement this
attributeName string
Результат int?

GetName() публичный статический Метод

public static GetName ( this xmlElement ) : string
xmlElement this
Результат string

GetOADate() публичный статический Метод

public static GetOADate ( this element, string attributeName = "date" ) : DateTime?
element this
attributeName string
Результат DateTime?

GetSingleElement() публичный статический Метод

public static GetSingleElement ( this doc, string tagName ) : XmlElement
doc this
tagName string
Результат System.Xml.XmlElement

IsAttributeSet() публичный статический Метод

public static IsAttributeSet ( this xmlElement, ISessionObject session, string attributeName ) : bool
xmlElement this
session ISessionObject
attributeName string
Результат bool

IsContainingOk() публичный статический Метод

public static IsContainingOk ( this xmlDoc ) : bool
xmlDoc this
Результат bool

NodeToString() публичный статический Метод

Creates a string representation of an XmlNode
public static NodeToString ( this xmlElement ) : string
xmlElement this The node
Результат string

SetAttributeValue() публичный статический Метод

Sets an attribute to a value. If no fitting XmlAttribute exists, a new one is created/appended and its value set.
public static SetAttributeValue ( this xmlElement, string attributeName, string value ) : void
xmlElement this The node
attributeName string Name of the attribute
value string Value to set the attribute to
Результат void

ToOADate() публичный статический Метод

public static ToOADate ( this value ) : System.DateTime
value this
Результат System.DateTime

TryGetGuid() публичный статический Метод

public static TryGetGuid ( this xmlElement, System.Guid &guid ) : bool
xmlElement this
guid System.Guid
Результат bool

TryGetGuid() публичный статический Метод

public static TryGetGuid ( this xmlElement, string attributeName, System.Guid &guid ) : bool
xmlElement this
attributeName string
guid System.Guid
Результат bool