Метод | Описание | |
---|---|---|
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 ( |
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 |
public static FirstChild ( ) : Primitive | ||
Результат | Primitive |
public static FromArray ( Primitive array ) : Primitive | ||
array | Primitive | A Small Basic array with the correct format. |
Результат | Primitive |
public static NextSibling ( ) : Primitive | ||
Результат | Primitive |
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 |
public static PreviousSibling ( ) : Primitive | ||
Результат | Primitive |
public static RemoveNode ( ) : Primitive | ||
Результат | Primitive |
public static Save ( Primitive fileName ) : Primitive | ||
fileName | Primitive | The full path to the file to write the xml. |
Результат | Primitive |
public static Switch ( Primitive docName ) : Primitive | ||
docName | Primitive | The name returned by Open method. |
Результат | Primitive |