C# Class LitDev.LDxml

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
fromArray ( Primitive array ) : void
toArray ( XmlNode node ) : Primitive

Method Details

AddNode() public static méthode

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.
Résultat Primitive

FirstChild() public static méthode

Move the current node to the first child node if there is one.
public static FirstChild ( ) : Primitive
Résultat Primitive

FirstNode() public static méthode

Set the current node to the first document node.
public static FirstNode ( ) : Primitive
Résultat Primitive

FromArray() public static méthode

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.
Résultat Primitive

LastChild() public static méthode

Move the current node to the last child node if there is one.
public static LastChild ( ) : Primitive
Résultat Primitive

NextSibling() public static méthode

Move the current node to the next sibling node if there is one.
public static NextSibling ( ) : Primitive
Résultat Primitive

Open() public static méthode

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.
Résultat Primitive

Parent() public static méthode

Move the current node to the parent node if there is one.
public static Parent ( ) : Primitive
Résultat Primitive

PreviousSibling() public static méthode

Move the current node to the previous sibling node if there is one.
public static PreviousSibling ( ) : Primitive
Résultat Primitive

RemoveNode() public static méthode

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
Résultat Primitive

Save() public static méthode

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.
Résultat Primitive

Switch() public static méthode

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.
Résultat Primitive

ToArray() public static méthode

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
Résultat Primitive