Below are the functions that will be made available by the sda javascript
function
addNode(sParent_Key,sKey,sElementName)
* Add a node into the xml structure
* Rule 1 - sKey must be unique
* Rule 2 - sParent_Key must exist
functiongetNode(sKey)
* Locates a node in the xml structure by its unique "k
ey" value
functiontraverseTree
* Print the contents of the xml structure (nodes and attributes)
functionnext
* Returns the "key" of the next node
* Rule 1 - Return the descendant node if one exists
* Rule 2 - If no descendant node exists return the next sibling
* Rule 3 - Otherwise return the parent node's - sibling node
functionprevious
* Returns the "key" of the previous node
* Rule 1 - Find Sibling - Find the bottom-most child of the sibling
* Rule 2 - Return previous sibling
* Rule 3 - Return parent node child node.
functionsetAttribute(sKey,sAttribute_Name,sValue)
* Associate an attribute name/value to a "node" element
functionremoveAttribute(sKey,sAttribute_Name)
* Remove an attribute name from a "node" element
functiondeleteNode(sKey)
* Remove a "node" element matching a filtered "key" value
functiongetCurrentNodeKey()
* Return the current "key" value for the active node
* Used with next and previous methods
functionsetCurrentNodeKey
* Set the current key value
* Used with next and previous methods
Comments