C# Класс Universe.Framework.Utilities.UniverseXmlDocument

Summary description for NSXML.
Наследование: System.Xml.XmlDocument
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddAttribute ( XmlNode node, string attributeName, string attributeValue ) : void

Addes an attribute and attribute value to a node passed in

AddAttribute ( string xPath, string attributeName, string attributeValue ) : void

Addes an attribute and attribute value to a node that the xPath resolves to

AddNode ( XmlNode selectedNode, XmlNode nodeToAdd ) : XmlNode

Adds a node to root

AddNode ( string nodeName, string nodeValue ) : XmlNode

Adds a node to root

AddNode ( string xPath, string nodeName, string nodeValue ) : XmlNode

Adds a node to root named by xPath

AddNode ( string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode

Adds a node with an attribute and attribute value to root

AddNode ( string xPath, string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode

Adds a node to root named by xPath

AddRootElement ( string nodeName ) : XmlElement

Adds the nodeName as the root element

AddXMLDoc ( UniverseXmlDocument XmlDoc, string xPathFrom, string xPathTo ) : UniverseXmlDocument

Combines to xml documents into one.

ConvertDateXML ( string xmlDate ) : string

Converts the common xml date to normal date

CreateNode ( string nodeName, int nodeValue ) : XmlNode

Creates and returns an XmlNode. This does not place it in the DOM.

CreateNode ( string nodeName, int nodeValue, string attributeName, int attributeValue ) : XmlNode

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.

CreateNode ( string nodeName, int nodeValue, string attributeName, string attributeValue ) : XmlNode

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.

CreateNode ( string nodeName, string nodeValue ) : XmlNode

Creates and returns an XmlNode. This does not place it in the DOM.

CreateNode ( string nodeName, string nodeValue, string attributeName, int attributeValue ) : XmlNode

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.

CreateNode ( string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.

DeleteNode ( XmlNode selectedNode ) : bool

Delete node

DeleteNode ( string xPath ) : bool

Delete node

DeleteNodes ( XmlNodeList selectedNodes ) : bool

Delete multiple nodes

DeleteNodes ( string xPath ) : bool

Delete multiple nodes

EditAttribute ( string xPath, string attributeName, string attributeValue ) : XmlNode

Edit the value of an attribute

EditNode ( string xPath, int theValue ) : XmlNode

Edit the value of a node

EditNode ( string xPath, int theValue, string attributeName, int attributeValue ) : XmlNode

Edit the value of a node

EditNode ( string xPath, int theValue, string attributeName, string attributeValue ) : XmlNode

Edit the value of a node

EditNode ( string xPath, string theValue ) : XmlNode

Edit the value of a node

EditNode ( string xPath, string theValue, string attributeName, int attributeValue ) : XmlNode

Edit the value of a node

EditNode ( string xPath, string theValue, string attributeName, string attributeValue ) : XmlNode

Edit the value of a node

GetAttribute ( string xPath, string attributeName ) : string

Edit the value of an attribute

GetXmlnodeValue ( string xPath ) : string

Return the value of a node, if the node does not exsist then string.Empty is returned

IsDate ( string value ) : bool
NewXmlDocumentWithRoot ( string rootName ) : UniverseXmlDocument

Creates a new UniverseXmlDocument with the specified rootName

UniverseXmlDocument ( ) : System

Default Constructor

UniverseXmlDocument ( string xml ) : System

Creates a UniverseXmlDocument and loads it with the xml

hasChildNodes2 ( XmlNode selectedNode ) : bool

Приватные методы

Метод Описание
IsNull ( string val ) : bool

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

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

Addes an attribute and attribute value to a node passed in
public AddAttribute ( XmlNode node, string attributeName, string attributeValue ) : void
node System.Xml.XmlNode Node to add the attribute and attribute value to
attributeName string Name of the attribute to add
attributeValue string Value of the attribute being added
Результат void

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

Addes an attribute and attribute value to a node that the xPath resolves to
public AddAttribute ( string xPath, string attributeName, string attributeValue ) : void
xPath string XPath of the node to add the attribute and attribute value to
attributeName string Name of the attribute to add
attributeValue string Value of the attribute being added
Результат void

AddNode() публичный Метод

Adds a node to root
public AddNode ( XmlNode selectedNode, XmlNode nodeToAdd ) : XmlNode
selectedNode System.Xml.XmlNode XmlNode where to add
nodeToAdd System.Xml.XmlNode XmlNode to add
Результат System.Xml.XmlNode

AddNode() публичный Метод

Adds a node to root
public AddNode ( string nodeName, string nodeValue ) : XmlNode
nodeName string Name of the node to add
nodeValue string Value of node to add
Результат System.Xml.XmlNode

AddNode() публичный Метод

Adds a node to root named by xPath
public AddNode ( string xPath, string nodeName, string nodeValue ) : XmlNode
xPath string
nodeName string
nodeValue string
Результат System.Xml.XmlNode

AddNode() публичный Метод

Adds a node with an attribute and attribute value to root
public AddNode ( string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode
nodeName string
nodeValue string
attributeName string
attributeValue string
Результат System.Xml.XmlNode

AddNode() публичный Метод

Adds a node to root named by xPath
public AddNode ( string xPath, string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode
xPath string
nodeName string
nodeValue string
attributeName string
attributeValue string
Результат System.Xml.XmlNode

AddRootElement() публичный Метод

Adds the nodeName as the root element
public AddRootElement ( string nodeName ) : XmlElement
nodeName string
Результат System.Xml.XmlElement

AddXMLDoc() публичный Метод

Combines to xml documents into one.
public AddXMLDoc ( UniverseXmlDocument XmlDoc, string xPathFrom, string xPathTo ) : UniverseXmlDocument
XmlDoc UniverseXmlDocument XmlDoc you want to add to this Xmldoc
xPathFrom string XPath to the node or nodes you want to move
xPathTo string XPath to the node that you want to place the xml
Результат UniverseXmlDocument

ConvertDateXML() публичный Метод

Converts the common xml date to normal date
public ConvertDateXML ( string xmlDate ) : string
xmlDate string
Результат string

CreateNode() публичный Метод

Creates and returns an XmlNode. This does not place it in the DOM.
public CreateNode ( string nodeName, int nodeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue int Value of the node to create
Результат System.Xml.XmlNode

CreateNode() публичный Метод

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.
public CreateNode ( string nodeName, int nodeValue, string attributeName, int attributeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue int Value of the node to create
attributeName string Attribute name in the node to create
attributeValue int Attribute value in the node to create
Результат System.Xml.XmlNode

CreateNode() публичный Метод

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.
public CreateNode ( string nodeName, int nodeValue, string attributeName, string attributeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue int Value of the node to create
attributeName string Attribute name in the node to create
attributeValue string Attribute value in the node to create
Результат System.Xml.XmlNode

CreateNode() публичный Метод

Creates and returns an XmlNode. This does not place it in the DOM.
public CreateNode ( string nodeName, string nodeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue string Value of the node to create
Результат System.Xml.XmlNode

CreateNode() публичный Метод

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.
public CreateNode ( string nodeName, string nodeValue, string attributeName, int attributeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue string Value of the node to create
attributeName string Attribute name in the node to create
attributeValue int Attribute value in the node to create
Результат System.Xml.XmlNode

CreateNode() публичный Метод

Creates and returns an XmlNode with an attribute and attribute value. This does not place it in the DOM.
public CreateNode ( string nodeName, string nodeValue, string attributeName, string attributeValue ) : XmlNode
nodeName string Name of the node to create
nodeValue string Value of the node to create
attributeName string Attribute name in the node to create
attributeValue string Attribute value in the node to create
Результат System.Xml.XmlNode

DeleteNode() публичный Метод

Delete node
public DeleteNode ( XmlNode selectedNode ) : bool
selectedNode System.Xml.XmlNode Node to delete from document
Результат bool

DeleteNode() публичный Метод

Delete node
public DeleteNode ( string xPath ) : bool
xPath string XPath to the node to delete
Результат bool

DeleteNodes() публичный Метод

Delete multiple nodes
public DeleteNodes ( XmlNodeList selectedNodes ) : bool
selectedNodes System.Xml.XmlNodeList Nodes to be deleted
Результат bool

DeleteNodes() публичный Метод

Delete multiple nodes
public DeleteNodes ( string xPath ) : bool
xPath string xPath to the nodes to be deleted
Результат bool

EditAttribute() публичный Метод

Edit the value of an attribute
public EditAttribute ( string xPath, string attributeName, string attributeValue ) : XmlNode
xPath string XPath to the node with the attribute to edit
attributeName string Name of the attribute to edit
attributeValue string New value of the attribute
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, int theValue ) : XmlNode
xPath string XPath to the node
theValue int New Value of the node
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, int theValue, string attributeName, int attributeValue ) : XmlNode
xPath string XPath to the node
theValue int New Value of the node
attributeName string Attribute name in the node to edit
attributeValue int Attribute value in the node to edit
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, int theValue, string attributeName, string attributeValue ) : XmlNode
xPath string XPath to the node
theValue int New Value of the node
attributeName string Attribute name in the node to edit
attributeValue string Attribute value in the node to edit
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, string theValue ) : XmlNode
xPath string XPath to the node
theValue string New Value of the node
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, string theValue, string attributeName, int attributeValue ) : XmlNode
xPath string XPath to the node
theValue string New Value of the node
attributeName string Attribute name in the node to edit
attributeValue int Attribute value in the node to edit
Результат System.Xml.XmlNode

EditNode() публичный Метод

Edit the value of a node
public EditNode ( string xPath, string theValue, string attributeName, string attributeValue ) : XmlNode
xPath string XPath to the node
theValue string New Value of the node
attributeName string Attribute name in the node to edit
attributeValue string Attribute value in the node to edit
Результат System.Xml.XmlNode

GetAttribute() публичный Метод

Edit the value of an attribute
public GetAttribute ( string xPath, string attributeName ) : string
xPath string XPath to the node with the attribute to edit
attributeName string Name of the attribute to edit
Результат string

GetXmlnodeValue() публичный Метод

Return the value of a node, if the node does not exsist then string.Empty is returned
public GetXmlnodeValue ( string xPath ) : string
xPath string XPath to the node you want the value of
Результат string

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

public static IsDate ( string value ) : bool
value string
Результат bool

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

Creates a new UniverseXmlDocument with the specified rootName
public static NewXmlDocumentWithRoot ( string rootName ) : UniverseXmlDocument
rootName string
Результат UniverseXmlDocument

UniverseXmlDocument() публичный Метод

Default Constructor
public UniverseXmlDocument ( ) : System
Результат System

UniverseXmlDocument() публичный Метод

Creates a UniverseXmlDocument and loads it with the xml
public UniverseXmlDocument ( string xml ) : System
xml string
Результат System

hasChildNodes2() публичный Метод

public hasChildNodes2 ( XmlNode selectedNode ) : bool
selectedNode System.Xml.XmlNode
Результат bool