C# Класс LitDev.LDxml

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

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

Метод Описание
AddNode ( Primitive name, Primitive attributes, Primitive text, Primitive location ) : Primitive

Add a new node. The current node is unchanged, it is not updated to be the new node.

FirstChild ( ) : Primitive

Move the current node to the first child node if there is one.

FirstNode ( ) : Primitive

Set the current node to the first document node.

FromArray ( Primitive array ) : Primitive

Performs the inverse function of ToArray method, create an xml document from an array definition.

LastChild ( ) : Primitive

Move the current node to the last child node if there is one.

NextSibling ( ) : Primitive

Move the current node to the next sibling node if there is one.

Open ( Primitive fileName ) : Primitive

Open an existing xml file. This must be called before any other methods can be used.

Parent ( ) : Primitive

Move the current node to the parent node if there is one.

PreviousSibling ( ) : Primitive

Move the current node to the previous sibling node if there is one.

RemoveNode ( ) : Primitive

Remove the current node and all child nodes. The current node is reset to the previous sibling or parent node if no previous sibling exists.

Save ( Primitive fileName ) : Primitive

Save the current xml document to a file.

Switch ( Primitive docName ) : Primitive

Switch to another open xml document. The current node for all documents are preserved.

ToArray ( ) : Primitive

Convert the current xml document to a Small Basic array. The structure and depth of the array may be quite complex. Each node has optional arrays "Attributes", and "Children" or "Data". If there are are child nodes then they are indexed first by number to deliminate multiple children with the same name.

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

Метод Описание
fromArray ( Primitive array ) : void
toArray ( XmlNode node ) : Primitive

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

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

Add a new node. The current node is unchanged, it is not updated to be the new node.
public static AddNode ( Primitive name, Primitive attributes, Primitive text, Primitive location ) : Primitive
name Primitive The new node element name.
attributes Primitive An array of attributes (values indexed by attribute name) for the new node or "".
text Primitive Inner text for the new node or "".
location Primitive Where the node is inserted. /// "Append" - insert at the end of current node's child nodes. /// "Prepend" - insert at the start of current node's child nodes. /// "Before" - insert before the current node. /// "After" - insert after the current node.
Результат Primitive

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

Move the current node to the first child node if there is one.
public static FirstChild ( ) : Primitive
Результат Primitive

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

Set the current node to the first document node.
public static FirstNode ( ) : Primitive
Результат Primitive

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

Performs the inverse function of ToArray method, create an xml document from an array definition.
public static FromArray ( Primitive array ) : Primitive
array Primitive A Small Basic array with the correct format.
Результат Primitive

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

Move the current node to the last child node if there is one.
public static LastChild ( ) : Primitive
Результат Primitive

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

Move the current node to the next sibling node if there is one.
public static NextSibling ( ) : Primitive
Результат Primitive

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

Open an existing xml file. This must be called before any other methods can be used.
public static Open ( Primitive fileName ) : Primitive
fileName Primitive The full path to the xml file to open. /// If this is "", then a new empty xml document is created.
Результат Primitive

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

Move the current node to the parent node if there is one.
public static Parent ( ) : Primitive
Результат Primitive

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

Move the current node to the previous sibling node if there is one.
public static PreviousSibling ( ) : Primitive
Результат Primitive

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

Remove the current node and all child nodes. The current node is reset to the previous sibling or parent node if no previous sibling exists.
public static RemoveNode ( ) : Primitive
Результат Primitive

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

Save the current xml document to a file.
public static Save ( Primitive fileName ) : Primitive
fileName Primitive The full path to the file to write the xml.
Результат Primitive

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

Switch to another open xml document. The current node for all documents are preserved.
public static Switch ( Primitive docName ) : Primitive
docName Primitive The name returned by Open method.
Результат Primitive

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

Convert the current xml document to a Small Basic array. The structure and depth of the array may be quite complex. Each node has optional arrays "Attributes", and "Children" or "Data". If there are are child nodes then they are indexed first by number to deliminate multiple children with the same name.
public static ToArray ( ) : Primitive
Результат Primitive